allura
修訂 | 8987f9b88c7e733db5306e5b8a4407c719919fe2 (tree) |
---|---|
時間 | 2012-05-04 02:21:02 |
作者 | Cory Johns <johnsca@geek...> |
Commiter | Yaroslav Luzin |
[#3970] Changed to use nhbd project for audit log when noting change of nhbd tracking ID
Signed-off-by: Cory Johns <johnsca@geek.net>
@@ -467,6 +467,7 @@ class NeighborhoodAdminController(object): | ||
467 | 467 | self.neighborhood.allow_browse = kw.get('allow_browse', False) |
468 | 468 | tracking_id = kw.get('tracking_id', '') |
469 | 469 | if tracking_id != self.neighborhood.tracking_id: |
470 | + c.project = self.neighborhood.neighborhood_project | |
470 | 471 | M.AuditLog.log('update neighborhood tracking_id') |
471 | 472 | self.neighborhood.tracking_id = tracking_id |
472 | 473 | if icon is not None and icon != '': |
@@ -622,10 +622,7 @@ class AuditLog(object): | ||
622 | 622 | message = message % args |
623 | 623 | elif kwargs: |
624 | 624 | message = message % kwargs |
625 | - if project: | |
626 | - return cls(project_id=project._id, user_id=user._id, url=url, message=message) | |
627 | - else: | |
628 | - return cls(user_id=user._id, url=url, message=message) | |
625 | + return cls(project_id=project._id, user_id=user._id, url=url, message=message) | |
629 | 626 | |
630 | 627 | main_orm_session.mapper(AuditLog, audit_log, properties=dict( |
631 | 628 | project_id=ForeignIdProperty('Project'), |