Skip to content

Commit

Permalink
Fix a1d9e49 which added _version as a kwarg even if None
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jul 24, 2024
1 parent 7a2791a commit 1dde28a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scrapyd/webservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,16 +201,17 @@ def render_POST(self, txrequest, project, spider, version, jobid, priority, sett
if spider not in spiders:
raise error.Error(code=http.OK, message=b"spider '%b' not found" % spider.encode())

spider_arguments = {key.decode(): values[0].decode() for key, values in txrequest.args.items()}
args = {key.decode(): values[0].decode() for key, values in txrequest.args.items()}
if version is not None:
args["_version"] = version

self.root.scheduler.schedule(
project,
spider,
priority=priority,
settings=dict(s.split("=", 1) for s in setting),
_version=version,
_job=jobid,
**spider_arguments,
**args,
)
return {"node_name": self.root.nodename, "status": "ok", "jobid": jobid}

Expand Down

0 comments on commit 1dde28a

Please sign in to comment.