Allow approving / adjusting of checked in shifts

This commit is contained in:
Tanner Collin 2018-06-28 03:55:22 +00:00
parent 3fac4591a1
commit 34eae84f24

View File

@ -264,8 +264,8 @@ class CShiftSerializer(ShiftSerializer):
instance.set_end = set_end
elif approved_start and approved_end:
if not instance.actual_end:
raise serializers.ValidationError("Can't approve / edit time until after checkout.")
if not instance.actual_start:
raise serializers.ValidationError("Can't approve / edit time until after checkin.")
if approved_start > approved_end:
raise serializers.ValidationError("Shift ends before it starts.")