Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWatzinger committed Nov 13, 2023
2 parents 809a675 + 3f82b24 commit cb2cfc6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion install/upgrade/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ then run the database upgrade script, then restart Apache:
sudo python3 install/upgrade/database_upgrade.py
sudo service apache2 restart

### 7.17.x to 7.17.2
### 7.17.x to 7.17.3
A code base update (e.g. with git pull) and a webserver restart is sufficient.

### 7.16.x to 7.17.0
Expand Down
8 changes: 5 additions & 3 deletions openatlas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ def before_request() -> None:
g.properties = CidocProperty.get_all(session['language'])
g.classes = OpenatlasClass.get_all()
with_count = False
if request.path.startswith('/type') or \
request.path.startswith('/api/type_tree/') or (
if (request.path.startswith('/type')
or request.path.startswith('/api/type_tree/')
or request.path.startswith('/admin/orphans')
or (
request.path.startswith('/entity/') and
request.path.split('/entity/')[1].isdigit()):
request.path.split('/entity/')[1].isdigit())):
with_count = True
g.types = Type.get_all(with_count)
g.reference_systems = ReferenceSystem.get_all()
Expand Down
11 changes: 6 additions & 5 deletions openatlas/display/base_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,13 @@ def add_tabs(self) -> None:

for link_ in entity.get_links(['P31', 'P67'], inverse=True):
domain = link_.domain
if domain.class_.view == 'reference_system':
entity.reference_systems.append(link_)
continue
data = get_base_table_data(domain)
if domain.class_.view in ['event']:
self.tabs[domain.class_.view].table.rows.append(data)
continue
if domain.class_.view == 'file':
ext = data[3]
data.append(profile_image_table_link(entity, domain, ext))
Expand All @@ -403,15 +409,10 @@ def add_tabs(self) -> None:
place_id=entity.id,
link_id=link_.id))
data.append(content)
if domain.class_.view == 'event':
continue
if domain.class_.view not in ['source', 'file']:
data.append(link_.description)
data.append(edit_link(
url_for('link_update', id_=link_.id, origin_id=entity.id)))
if domain.class_.view == 'reference_system':
entity.reference_systems.append(link_)
continue
data.append(
remove_link(domain.name, link_, entity, domain.class_.view))
self.tabs[domain.class_.view].table.rows.append(data)
Expand Down
7 changes: 5 additions & 2 deletions openatlas/models/type.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,5 +230,8 @@ def insert_hierarchy(
@staticmethod
def get_type_orphans() -> list[Type]:
return [
n for key, n in g.types.items()
if n.root and n.count < 1 and not n.subs]
node for key, node in g.types.items()
if node.root
and node.category not in ['system', 'tools']
and node.count < 1
and not node.subs]
2 changes: 1 addition & 1 deletion openatlas/views/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def admin_orphans() -> str:
table=Table(
['name', 'root'],
[[link(type_), link(g.types[type_.root[0]])]
for type_ in Type.get_type_orphans()])),
for type_ in Type.get_type_orphans()])),
'missing_files': Tab('missing_files', table=Table(header)),
'orphaned_files': Tab(
'orphaned_files',
Expand Down
6 changes: 5 additions & 1 deletion openatlas/views/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ def index_changelog() -> str:

versions = {
'7.18.0': ['TBA', {}],
'7.17.3': ['2023-11-13', {
'fix': {
'2117': 'Modification events not showing at artifact view',
'2118': 'Wrong listing of type orphans'}}],
'7.17.2': ['2023-11-09', {
'fix': {
'2114': 'JavaSrcipt datatable error'}}],
'2114': 'JavaScript datatable error'}}],
'7.17.1': ['2023-11-06', {
'fix': {
'2110': 'API: licensed file overview broken',
Expand Down

0 comments on commit cb2cfc6

Please sign in to comment.