Skip to content

Commit

Permalink
[bugfix] replace error by warning
Browse files Browse the repository at this point in the history
The error makes flexilims unusable
  • Loading branch information
Antonin Blot committed Mar 19, 2024
1 parent 572ed87 commit 53523e4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change log

## v0.3.9

### Main changes

- Replace crash for conflicting attributes by a warning

## v0.3.8

### Main changes
Expand Down
7 changes: 3 additions & 4 deletions flexiznam/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1262,10 +1262,9 @@ def format_results(results, return_list=False):
for result in results:
for attr_name, attr_value in result["attributes"].items():
if attr_name in result:
raise FlexilimsError(
"An entity should not have %s as attribute" % attr_name
)
result[attr_name] = attr_value
warnings.warn("An entity should not have %s as attribute" % attr_name)
else:
result[attr_name] = attr_value
result.pop("attributes")
if return_list:
return results
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="flexiznam",
version="v0.3.8",
version="v0.3.9",
url="https://github.com/znamlab/flexznam",
license="MIT",
author="Antonin Blot",
Expand Down

0 comments on commit 53523e4

Please sign in to comment.