--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -622,10 +622,7 @@
             message = message % args
         elif kwargs:
             message = message % kwargs
-        if project:
-            return cls(project_id=project._id, user_id=user._id, url=url, message=message)
-        else:
-            return cls(user_id=user._id, url=url, message=message)
+        return cls(project_id=project._id, user_id=user._id, url=url, message=message)
 
 main_orm_session.mapper(AuditLog, audit_log, properties=dict(
         project_id=ForeignIdProperty('Project'),