vvangelovski / django-audit-log

Audit log for your Django models
Other
232 stars 93 forks source link

obj =form.save(commit=False) does not save the AuthStampedModel Data to obj. #42

Open sharad-s opened 7 years ago

sharad-s commented 7 years ago
        obj = form.save(commit=False)
        print("created_by: ",obj.created_by)
        print("created_with_session_key: ",obj.created_with_session_key)
        print("modified_by: ",obj.modified_by)
        print("modified_with_session_key: ",obj.modified_with_session_key)
        print("created: ",obj.created)
        print("modified: ",obj.modified)

Will always return : created_by: None created_with_session_key: None modified_by: None modified_with_session_key: None created: None modified: None

I may be doing something wrong but from what I've tested, this is always the case. Please let me know how to save AuthStampedModel Data during a form.save(commit=False), or allow for that functionality