Browse Source

Lint fixes

master
Juan Madurga 10 years ago
parent
commit
71f09b9ffb
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/oscar/apps/basket/abstract_models.py

+ 3
- 1
src/oscar/apps/basket/abstract_models.py View File

@@ -338,7 +338,9 @@ class AbstractBasket(models.Model):
338 338
         base = '%s_%s' % (product.id, stockrecord.id)
339 339
         if not options:
340 340
             return base
341
-        return "%s_%s" % (base, zlib.crc32(repr([{'option':repr(option['option']),'value': repr(option['value'])} for option in options]).encode('utf8')))
341
+        repr_options = [{'option': repr(option['option']),
342
+                         'value': repr(option['value'])} for option in options]
343
+        return "%s_%s" % (base, zlib.crc32(repr(repr_options).encode('utf8')))
342 344
 
343 345
     def _get_total(self, property):
344 346
         """

Loading…
Cancel
Save