Skip to content

Commit

Permalink
Fixed sex estimate update
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWatzinger committed Dec 9, 2024
1 parent a361de6 commit 695b416
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions openatlas/models/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def save(
entity: Entity,
data: dict[str, str],
types: list[dict[str, Any]]) -> None:
from openatlas.models.entity import Link
for dict_ in types:
Link.delete_(dict_['link_id'])
SexEstimation.prepare_feature_types()
Expand Down
6 changes: 3 additions & 3 deletions tests/test_place.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,13 @@ def test_place(self) -> None:
url_for('sex_update', id_=strati_id),
data={'Glabella': 'Female'},
follow_redirects=True)
assert b'-2.0' in rv.data
assert b'Female' in rv.data

rv = c.post(
url_for('sex_update', id_=strati_id),
data={'Glabella': 'Female'},
data={'Glabella': 'Female?'},
follow_redirects=True)
assert b'-2.0' in rv.data
assert b'Female?' in rv.data

rv = c.get(url_for('sex_update', id_=strati_id))
assert b'Glabella' in rv.data
Expand Down

0 comments on commit 695b416

Please sign in to comment.