Skip to content

Commit

Permalink
fix(task/priority): change field to SmallIntegerField (#2914)
Browse files Browse the repository at this point in the history
  • Loading branch information
gagantrivedi authored Nov 1, 2023
1 parent 6a730c7 commit 6e6a48b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
19 changes: 14 additions & 5 deletions api/task_processor/migrations/0010_task_priority.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@


class Migration(migrations.Migration):

dependencies = [
('task_processor', '0009_add_recurring_task_run_first_run_at'),
("task_processor", "0009_add_recurring_task_run_first_run_at"),
]

operations = [
migrations.AddField(
model_name='task',
name='priority',
field=models.PositiveSmallIntegerField(choices=[(100, 'Lower'), (75, 'Low'), (50, 'Normal'), (25, 'High'), (0, 'Highest')], default=None, null=True),
model_name="task",
name="priority",
field=models.SmallIntegerField(
choices=[
(100, "Lower"),
(75, "Low"),
(50, "Normal"),
(25, "High"),
(0, "Highest"),
],
default=None,
null=True,
),
),
]
2 changes: 1 addition & 1 deletion api/task_processor/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Task(AbstractBaseTask):
num_failures = models.IntegerField(default=0)
completed = models.BooleanField(default=False)
objects = TaskManager()
priority = models.PositiveSmallIntegerField(
priority = models.SmallIntegerField(
default=None, null=True, choices=TaskPriority.choices
)

Expand Down

3 comments on commit 6e6a48b

@vercel
Copy link

@vercel vercel bot commented on 6e6a48b Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./docs

docs.flagsmith.com
docs-git-main-flagsmith.vercel.app
docs.bullet-train.io
docs-flagsmith.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 6e6a48b Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 6e6a48b Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.