Skip to content

Commit edd9e7b

Browse files
palkerecsenyikpsherva
authored andcommitted
jobs: remove string cast for since argument
* The `since` parameter was string-cast to fix a previous bug in Oct 2024, e.g. in `invenio-vocabularies`: inveniosoftware/invenio-vocabularies#419 * In inveniosoftware/invenio-jobs#87, this string cast is now being removed. The documentation has been updated to no longer recommend adding this string cast.
1 parent a8d53d4 commit edd9e7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/operate/customize/jobs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class UpdateEmbargoesJob(JobType):
7575

7676
@classmethod
7777
def build_task_arguments(cls, job_obj, since=None, **kwargs):
78-
return {"since": str(since)}
78+
return {"since": since}
7979
```
8080

8181
To include custom fields in the admin form, define a Marshmallow schema:
@@ -101,7 +101,7 @@ class UpdateEmbargoesJob(JobType):
101101
@classmethod
102102
def build_task_arguments(cls, job_obj, since=None, dry_run=False, **kwargs):
103103
return {
104-
"since": str(since) if since else None,
104+
"since": since,
105105
"dry_run": dry_run
106106
}
107107
```

0 commit comments

Comments
 (0)