Skip to content

Commit

Permalink
Fix for types not knowing their category (#1609)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWatzinger committed Nov 23, 2021
1 parent b7ed00d commit dd5cc79
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from openatlas import app

VERSION = '6.6.1'
VERSION = '6.6.2'
DATABASE_VERSION = '6.6.0'
DEMO_MODE = False # If activated some options are disabled, login is pre filled
IS_UNIT_TEST = False
Expand Down
3 changes: 3 additions & 0 deletions install/upgrade/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ is working.

service apache2 restart

### 6.6.1 to 6.6.2
A code base update (e.g. with git pull) and an Apache restart is sufficient.

### 6.6.0 to 6.6.1
A code base update (e.g. with git pull) and an Apache restart is sufficient.

Expand Down
2 changes: 1 addition & 1 deletion openatlas/models/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def __init__(self, data: Dict[str, Any]) -> None:
self.id = data['id']
self.standard_type = None
self.nodes: Dict['Node', str] = {}
self.name = data['name']

if 'nodes' in data and data['nodes']:
for item in data['nodes']:
Expand All @@ -46,7 +47,6 @@ def __init__(self, data: Dict[str, Any]) -> None:
self.aliases = {k: v for k, v in sorted(
self.aliases.items(),
key=lambda item_: item_[1])}
self.name = data['name']
self.description = data['description']
self.created = data['created']
self.modified = data['modified']
Expand Down
2 changes: 1 addition & 1 deletion openatlas/models/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def populate_subs(nodes: Dict[int, Node]) -> None:
node,
node.root[0],
node.root)
node.category = nodes[node.root[-1]].category
node.category = hierarchies[node.root[-1]]['category']
else:
node.category = hierarchies[node.id]['category']
node.multiple = hierarchies[node.id]['multiple']
Expand Down
3 changes: 3 additions & 0 deletions openatlas/util/changelog.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
class Changelog:

versions = {
'6.6.2': ['2021-11-23', {
'fix': {
'1609': 'Problem with types'}}],
'6.6.1': ['2021-11-20', {
'fix': {
'1607': 'Error at profile for readonly users'}}],
Expand Down
10 changes: 4 additions & 6 deletions tests/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ def test_index(self) -> None:
assert b'first' in rv.data

# Translations
rv = self.app.get(
url_for('set_locale', language='de'),
follow_redirects=True)
self.app.get(url_for('set_locale', language='de'))
rv = self.app.get('/')
assert b'Quelle' in rv.data
rv = self.app.get(
url_for('set_locale', language='en'),
follow_redirects=True)
self.app.get(url_for('set_locale', language='en'))
rv = self.app.get('/')
assert b'Source' in rv.data

rv = self.app.get(
Expand Down

0 comments on commit dd5cc79

Please sign in to comment.