diff --git a/osinaweb/osinacore/edit/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/edit/__pycache__/views.cpython-310.pyc index 61a5a701..3ce92b3b 100644 Binary files a/osinaweb/osinacore/edit/__pycache__/views.cpython-310.pyc and b/osinaweb/osinacore/edit/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/osinacore/edit/views.py b/osinaweb/osinacore/edit/views.py index d69fcebd..9d469f26 100644 --- a/osinaweb/osinacore/edit/views.py +++ b/osinaweb/osinacore/edit/views.py @@ -444,11 +444,11 @@ def mark_point_working_on(request, point_id, task_id): if PointActivity.objects.filter(point=point).count() == 1: status_text = f'Started Working On: {point.text}' - status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, task=point.task) + status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, task=point.task.id) status.save() else: status_text = f'Resumed Working On: {point.text}' - status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, task=point.task) + status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, task=point.task.id) status.save() @@ -477,11 +477,11 @@ def mark_point_working_on_task_page(request, point_id, task_id): if PointActivity.objects.filter(point=point).count() == 1: status_text = f'Started Working On: {point.text}' - status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, type='Task', type_id=point.task) + status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, type='Task', type_id=point.task.id) status.save() else: status_text = f'Resumed Working On: {point.text}' - status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, type='Task', type_id=point.task) + status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, type='Task', type_id=point.task.id) status.save() @@ -505,7 +505,7 @@ def mark_point_paused(request, point_id, task_id): last_activity.save() status_text = f'{point.text} - Paused' - status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, type='Task', type_id=point.task) + status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, type='Task', type_id=point.task.id) status.save() @@ -531,7 +531,7 @@ def mark_point_paused_task_page(request, point_id, task_id): last_activity.save() status_text = f'{point.text} - Paused' - status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, type='Task', type_id=point.task) + status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, type='Task', type_id=point.task.id) status.save() @@ -569,7 +569,7 @@ def mark_point_completed(request, point_id, task_id): if formatted_time: status_text += f' in {formatted_time}' - status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, type='Task', type_id=point.task) + status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, type='Task', type_id=point.task.id) status.save() task_id_str = task.task_id @@ -610,7 +610,7 @@ def mark_point_completed_task_page(request, point_id, task_id): if formatted_time: status_text += f' in {formatted_time}' - status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, type='Task', type_id=point.task) + status = Status(text=status_text, date_time=timezone.now(), staff=request.user.staffprofile, type='Task', type_id=point.task.id) status.save() return redirect('detailed-task', task_id=task.task_id)