Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

fix: update report billed flag to be like project billed flag #988

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
3 changes: 1 addition & 2 deletions timed/tracking/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ def bulk(self, request):
if "task" in fields:
# unreject report if task has changed
fields["rejected"] = False
if fields["task"].project.billed:
fields["billed"] = fields["task"].project.billed
fields["billed"] = True if fields["task"].project.billed else False
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
fields["billed"] = True if fields["task"].project.billed else False
fields["billed"] = fields["task"].project.billed

this should also work since its a boolean

Copy link
Contributor

Choose a reason for hiding this comment

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

@c0rydoras that's where this started off at #988 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

fields["billed"] = bool(fields["task"].project.billed)

Copy link
Contributor

Choose a reason for hiding this comment

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

if it isn't a boolean this accomplishes the same


if fields:
# send notification if report was rejected
Expand Down
Loading