Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feature: Detect if an project was deleted
  • Loading branch information
fabidick22 committed Jun 11, 2020
commit 12cb1290b6ea1154c56d7cdf1ba61443d08af241
3 changes: 2 additions & 1 deletion utils/extend_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def add_project_name_to_time_entries(time_entries, projects):
for time_entry in time_entries:
for project in projects:
if time_entry.project_id == project.id:
setattr(time_entry, 'project_name', project.name)
name = project.name + " (archived)" if project.is_deleted() else project.name
setattr(time_entry, 'project_name', name)


def add_activity_name_to_time_entries(time_entries, activities):
Expand Down