Not sure myself, but it might be a better question for the much wider django-users list.
On Thu, Apr 16, 2015 at 12:36 PM, Graham <[email protected]> wrote: > Hi guys > I have some code in a clean() method that works ok on Django 1.77 but > stops working in 1.8 > > The scenario > > class Span(models.Model): > > happening = models.ForeignKey('Happening', blank = True, null = True) > soul_class = models.ForeignKey('SoulClass', blank = True, null = True) > > > In the clean() method of the Span class I have a check as follows > if self.happening: > foo > > if self.soul_class: > bar > > This was working fine in Django up to 1.77 but when I upgrade to Django > 1.8 both self.happening *and* self.soul_class are None. > > The primary difference appears to be the value of _soul_class_cache as > follows..... > > The Span object in 1.77 looks like > {'end_date': None, 'id': None, '_state': <django.db.models.base.ModelState > object at 0x7ff046ac1320>, 'start_date': datetime.date(2015, 4, 16), > 'soul_class_id': None, 'end_time': datetime.time(14, 12), 'happening_id': > None, '_happening_cache': None, 'start_time': datetime.time(14, 12), > '_soul_class_cache': <SoulClass: Chi Kung>} > > In 1.8 > {'start_time': datetime.time(14, 0), 'end_date': None, 'soul_class_id': > None, '_state': <django.db.models.base.ModelState object at > 0x7f88d698d2e8>, 'happening_id': None, '_happening_cache': None, > '_soul_class_cache': None, 'end_time': datetime.time(15, 0), 'id': None, > 'start_date': datetime.date(2015, 4, 16)} > > Any ideas? > Cheers > g > > -- > You received this message because you are subscribed to the Google Groups > "Mezzanine Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Stephen McDonald http://jupo.org -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
