Switch to unified view

a/Allura/allura/model/attachments.py b/Allura/allura/model/attachments.py
...
...
13
    thumbnail_size = (255, 255)
13
    thumbnail_size = (255, 255)
14
    ArtifactType=None
14
    ArtifactType=None
15
15
16
    class __mongometa__:
16
    class __mongometa__:
17
        name = 'attachment'
17
        name = 'attachment'
18
        polymorphic_on = 'attachment_type'
19
        polymorphic_identity=None
18
        session = project_orm_session
20
        session = project_orm_session
19
        indexes = [ 'artifact_id', 'app_config_id' ]
21
        indexes = [ 'artifact_id', 'app_config_id' ]
20
22
21
    artifact_id=FieldProperty(S.ObjectId)
23
    artifact_id=FieldProperty(S.ObjectId)
22
    app_config_id=FieldProperty(S.ObjectId)
24
    app_config_id=FieldProperty(S.ObjectId)
23
    type=FieldProperty(str)
25
    type=FieldProperty(str)
26
    attachment_type=FieldProperty(str)
24
27
25
    @property
28
    @property
26
    def artifact(self):
29
    def artifact(self):
27
        return self.ArtifactType.query.get(_id=self.artifact_id)
30
        return self.ArtifactType.query.get(_id=self.artifact_id)
28
31