Skip to content

Commit

Permalink
Modification for places (#2070)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWatzinger committed Oct 10, 2023
1 parent ee782a8 commit 788a739
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openatlas/display/base_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def add_tabs(self) -> None:
and current_user.settings['module_map_overlay']:
self.tabs['file'].table.header.append(_('overlay'))

for link_ in entity.get_links('P67', inverse=True):
for link_ in entity.get_links(['P31', 'P67'], inverse=True):
domain = link_.domain
data = get_base_table_data(domain)
if domain.class_.view == 'file':
Expand Down
2 changes: 1 addition & 1 deletion openatlas/display/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class ModificationDisplay(EventsDisplay):

def add_data(self) -> None:
super().add_data()
self.data[_('artifact')] = \
self.data[_('object')] = \
[link(entity) for entity in self.entity.get_linked_entities('P31')]


Expand Down
1 change: 1 addition & 0 deletions openatlas/views/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def index_changelog() -> str:
'7.17.0': ['TBA', {
'feature': {
'2026': 'External reference systems for type hierarchies',
'2070': 'Modification (E11) for Place (E18)',
'2083': 'API: List of images'},
'fix': {
'2078': 'API: CSV export not working'
Expand Down
5 changes: 4 additions & 1 deletion tests/test_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ def test_event(self) -> None:

rv = self.app.post(
url_for('insert', class_='modification'),
data={'name': 'A modification event', 'artifact': artifact.id})
data={
'name': 'A modification event',
'artifact': artifact.id,
'modified_place': residence.id})
modification_id = rv.location.split('/')[-1]

rv = self.app.get(url_for('view', id_=modification_id))
Expand Down

0 comments on commit 788a739

Please sign in to comment.