Skip to content

Commit

Permalink
fix: comparison of incompatible types. Addresses #1492
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaiarocci committed Nov 8, 2022
1 parent db0f471 commit 71689d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CHANGES.rst
Expand Up @@ -6,7 +6,9 @@ Here you can see the full list of changes between each Eve release.
In Development
---------------

- hic sunt leones.
- Fix: comparison of incompatible types (`#1492`_)

.. _`#1492`: https://github.com/pyeve/eve/issues/1492

Version v2.0.3
--------------
Expand Down
6 changes: 1 addition & 5 deletions eve/methods/common.py
Expand Up @@ -754,11 +754,7 @@ def resolve_data_relation_links(document, resource):
if "data_relation" not in field_def:
continue

if (
field in document
and document[field] is not None
and document[field] is not []
):
if field in document and document[field] is not None and document[field] != []:
related_links = []

# Make the code DRY for list of linked relation and single linked relation
Expand Down

0 comments on commit 71689d4

Please sign in to comment.