Allow approving / adjusting of checked in shifts
This commit is contained in:
parent
3fac4591a1
commit
34eae84f24
|
@ -264,8 +264,8 @@ class CShiftSerializer(ShiftSerializer):
|
||||||
instance.set_end = set_end
|
instance.set_end = set_end
|
||||||
|
|
||||||
elif approved_start and approved_end:
|
elif approved_start and approved_end:
|
||||||
if not instance.actual_end:
|
if not instance.actual_start:
|
||||||
raise serializers.ValidationError("Can't approve / edit time until after checkout.")
|
raise serializers.ValidationError("Can't approve / edit time until after checkin.")
|
||||||
|
|
||||||
if approved_start > approved_end:
|
if approved_start > approved_end:
|
||||||
raise serializers.ValidationError("Shift ends before it starts.")
|
raise serializers.ValidationError("Shift ends before it starts.")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user