Skip to content

Commit

Permalink
Merge pull request #14 from toudi/master
Browse files Browse the repository at this point in the history
Fix for 'NoneType' is not iterable
  • Loading branch information
Fred Wenzel committed Feb 10, 2013
2 parents 24de857 + 75abc7f commit 5638152
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion django_gearman/models.py
Expand Up @@ -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)
# We must ensure if kwargs actually exist,
# Otherwise 'NoneType' is not iterable is thrown
if kwargs:
data["kwargs"].update(kwargs)

return data

Expand Down

0 comments on commit 5638152

Please sign in to comment.