Permalink
Browse files

Merge pull request #14 from toudi/master

Fix for 'NoneType' is not iterable
  • Loading branch information...
2 parents 24de857 + 75abc7f commit 5638152c72f6edf2c3ec61cb853b8d9bd1889c7f @fwenzel committed Feb 10, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 django_gearman/models.py
View
@@ -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

0 comments on commit 5638152

Please sign in to comment.