Commits

Vasil Vangelovski  committed 85aae44

Fix for github issue #2

  • Participants
  • Parent commits d2d181b

Comments (0)

Files changed (3)

File audit_log/models/managers.py

         self.model = model
     
     def __get__(self, instance, owner):
-        values = (getattr(instance, f.attname) for f in self.model._meta.fields)
-        return self.model(*values)
-
+        kwargs = dict((f.attname, getattr(instance, f.attname))
+                    for f in self.model._meta.fields
+                    if hasattr(instance, f.attname))
+        return self.model(**kwargs)
+        
+      
 class AuditLogManager(models.Manager):
     def __init__(self, model, instance = None):
         super(AuditLogManager, self).__init__()

File testproject/__init__.pyc

Binary file removed.

File testproject/settings.pyc

Binary file removed.