mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-25 21:41:27 +00:00
fix uid compare
This commit is contained in:
parent
5f34337fb4
commit
64425ac443
|
@ -127,7 +127,7 @@ class Jobs:
|
|||
Remove a job from the jobs list.
|
||||
"""
|
||||
with WriteUserData(UserDataFiles.JOBS) as user_data:
|
||||
user_data = [x for x in user_data if x["uid"] != job.uid]
|
||||
user_data = [x for x in user_data if x["uid"] != job.uid.urn]
|
||||
|
||||
def update(
|
||||
self,
|
||||
|
@ -159,7 +159,7 @@ class Jobs:
|
|||
job.finished_at = datetime.datetime.now()
|
||||
|
||||
with WriteUserData(UserDataFiles.JOBS) as user_data:
|
||||
user_data = [x for x in user_data if x["uid"] != job.uid]
|
||||
user_data = [x for x in user_data if x["uid"] != job.uid.urn]
|
||||
user_data.append(json.loads(job.json()))
|
||||
|
||||
return job
|
||||
|
|
Loading…
Reference in a new issue