From 11487cdab362bdea019ee46f77c545525d4d1f52 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 6 Jan 2015 16:50:01 +0100 Subject: [PATCH] Fix the unit tests --- src/tixlbase/tests/test_models.py | 1 - src/tixlplugins/timerestriction/signals.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tixlbase/tests/test_models.py b/src/tixlbase/tests/test_models.py index 433510768c..90d5ac4630 100644 --- a/src/tixlbase/tests/test_models.py +++ b/src/tixlbase/tests/test_models.py @@ -40,7 +40,6 @@ class ItemVariationsTest(TestCase): for vd in variations: for i, v in vd.relevant_items(): - self.assertIs(type(i), int) self.assertIs(type(v), PropertyValue) for v in vd.relevant_values(): diff --git a/src/tixlplugins/timerestriction/signals.py b/src/tixlplugins/timerestriction/signals.py index 2c75f480e0..4fbcd40304 100644 --- a/src/tixlplugins/timerestriction/signals.py +++ b/src/tixlplugins/timerestriction/signals.py @@ -62,8 +62,8 @@ def availability_handler(sender, **kwargs): price = None # Make up some unique key for this variation - cachekey = 'timerestriction:%d:%s' % ( - item.pk, + cachekey = 'timerestriction:%s:%s' % ( + item.identity, v.identify(), )