Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix for 'NoneType' is not iterable #14

Merged
merged 1 commit into from

2 participants

@toudi

No description provided.

@fwenzel fwenzel commented on the diff
django_gearman/models.py
@@ -56,7 +56,10 @@ def parse_data(self, arg, args=None, kwargs=None, *arguments, **karguments):
data["args"] = args
data["kwargs"].update(karguments)
- data["kwargs"].update(kwargs)
@fwenzel Owner
fwenzel added a note

you could also do: data['kwargs'].update(kwargs or []). But your solution is more easily understandable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@fwenzel fwenzel merged commit 5638152 into fwenzel:master
@fwenzel
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 11, 2013
  1. @toudi
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 django_gearman/models.py
View
5 django_gearman/models.py
@@ -56,7 +56,10 @@ def parse_data(self, arg, args=None, kwargs=None, *arguments, **karguments):
data["args"] = args
data["kwargs"].update(karguments)
- data["kwargs"].update(kwargs)
@fwenzel Owner
fwenzel added a note

you could also do: data['kwargs'].update(kwargs or []). But your solution is more easily understandable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ # We must ensure if kwargs actually exist,
+ # Otherwise 'NoneType' is not iterable is thrown
+ if kwargs:
+ data["kwargs"].update(kwargs)
return data
Something went wrong with that request. Please try again.