[Plugin] Schedule: Allow retraction of service
This commit is contained in:
parent
ed361a7361
commit
e7efa53071
|
@ -169,6 +169,11 @@ def delete_job(job: Job):
|
|||
|
||||
def assign_to_job(job: Job, user, value):
|
||||
service = Service.query.get((job.id, user._id))
|
||||
if value < 0:
|
||||
if not service:
|
||||
raise BadRequest
|
||||
db.session.delete(service)
|
||||
else:
|
||||
if service:
|
||||
service.value = value
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue