Fixed issue with date_fin causing 500 error
authorBenoit C. Sirois <benoit.clennett-sirois@auf.org>
Wed, 27 Feb 2013 22:15:02 +0000 (17:15 -0500)
committerBenoit C. Sirois <benoit.clennett-sirois@auf.org>
Wed, 27 Feb 2013 22:15:02 +0000 (17:15 -0500)
project/rh/models.py

index f7c67e0..ddce0bf 100644 (file)
@@ -1860,8 +1860,10 @@ class ChangementPersonnel(models.Model):
        
         # Here, verify differences between the instance, before and
         # after the save.
+        df_has_changed = False
+
         if created:
-            if instance.before_save.date_fin != None:
+            if df != None:
                 df_has_changed = True
         else:
             df_has_changed = (df != instance.before_save.date_fin and