Skip to content

Commit

Permalink
Proper DOING clone
Browse files Browse the repository at this point in the history
  • Loading branch information
thenav56 committed Aug 9, 2024
1 parent 657c5ab commit b65f593
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ def clone_doing_entries(self, today: datetime.date):
if existing_qs.exists():
continue
time_entry.pk = None # Create a new copy
time_entry.status = TimeEntry.Status.TODO # Use todo Status
time_entry.date = today
time_entry.status = TimeEntry.Status.TODO # Use todo Status
# Clear data
time_entry.start_time = None
time_entry.duration = None
# Save
time_entry.save()
cloned_count += 1
self.stdout.write(self.style.SUCCESS(f"{cloned_count} DOING cloned"))

def handle(self, **_):
Expand Down

0 comments on commit b65f593

Please sign in to comment.