Skip to content
Snippets Groups Projects
Commit 618ddcf9 authored by Lorenz Zahn's avatar Lorenz Zahn
Browse files

bug fix: empty field in allprojects form

parent 873c3f19
Branches
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ class AssigneeForm(forms.Form):
project_assignment=assignment,
period=period,
)
value = self.cleaned_data[field_name] - (workhours.aggregate(Sum('hours'))['hours__sum'] or 0)
value = (self.cleaned_data[field_name] or 0) - (workhours.aggregate(Sum('hours'))['hours__sum'] or 0)
if value == 0:
WorkHoursCorrection.objects.filter(
project_assignment=assignment,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment