|
a/Allura/allura/model/monq_model.py |
|
b/Allura/allura/model/monq_model.py |
|
... |
|
... |
72 |
kwargs = FieldProperty({None:None})
|
72 |
kwargs = FieldProperty({None:None})
|
73 |
result = FieldProperty(None, if_missing=None)
|
73 |
result = FieldProperty(None, if_missing=None)
|
74 |
|
74 |
|
75 |
def __repr__(self):
|
75 |
def __repr__(self):
|
76 |
from allura import model as M
|
76 |
from allura import model as M
|
77 |
c.project = M.Project.query.get(_id=self.context.project_id)
|
77 |
project = M.Project.query.get(_id=self.context.project_id)
|
78 |
c.app = None
|
78 |
app = None
|
79 |
if c.project:
|
79 |
if project:
|
80 |
app_config = M.AppConfig.query.get(_id=self.context.app_config_id)
|
80 |
app_config = M.AppConfig.query.get(_id=self.context.app_config_id)
|
81 |
if app_config:
|
81 |
if app_config:
|
82 |
c.app = c.project.app_instance(app_config)
|
82 |
app = project.app_instance(app_config)
|
83 |
c.user = M.User.query.get(_id=self.context.user_id)
|
83 |
user = M.User.query.get(_id=self.context.user_id)
|
84 |
project_url = c.project and c.project.url() or None
|
84 |
project_url = project and project.url() or None
|
85 |
app_mount = c.app and c.app.config.options.mount_point or None
|
85 |
app_mount = app and app.config.options.mount_point or None
|
86 |
username = c.user and c.user.username or None
|
86 |
username = user and user.username or None
|
87 |
return '<%s %s (%s) P:%d %s %s project:%s app:%s user:%s>' % (
|
87 |
return '<%s %s (%s) P:%d %s %s project:%s app:%s user:%s>' % (
|
88 |
self.__class__.__name__,
|
88 |
self.__class__.__name__,
|
89 |
self._id,
|
89 |
self._id,
|
90 |
self.state,
|
90 |
self.state,
|
91 |
self.priority,
|
91 |
self.priority,
|