Skip to content

Commit

Permalink
fix delete taskconfigitem bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bios000 committed Feb 28, 2023
1 parent 034b656 commit 2398f5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/account/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
REGISTER_TYPE = Enumeration([
(0, "REFUSE", "refuse"),
(1, "EMAIL", "email"),
(3, "INVITE", "invite"),
(2, "INVITE", "invite"),
])
4 changes: 2 additions & 2 deletions modules/task/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ def delete_config(self, request, *args, **kwargs):

with transaction.atomic():
task_id = task_config.task_id
TaskConfig.objects.get(id=task_config_id).delete()
TaskConfigItem.objects.get(task_config_id=task_config_id).delete()
TaskConfig.objects.filter(id=task_config_id).delete()
TaskConfigItem.objects.filter(task_config_id=task_config_id).delete()

queryset = self.filter_queryset(
TaskConfigItem.objects.filter(task_config__task__user=self.request.user.id, task_id=task_id))
Expand Down

0 comments on commit 2398f5e

Please sign in to comment.