Skip to content

Commit

Permalink
entities: fix for not-hashable value
Browse files Browse the repository at this point in the history
Co-Authored-by: Bertrand Zuchuat <[email protected]>
  • Loading branch information
Garfield-fr committed Aug 21, 2023
1 parent d780c3d commit 7a31b4a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions rero_ils/modules/entities/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
from .models import EntityType
from .proxy import MEFProxyFactory

import typing

blueprint = Blueprint(
'entities',
__name__,
Expand Down Expand Up @@ -148,10 +150,11 @@ def entity_merge_data_values(data):
if isinstance(values, str):
values = [values]
for value in values:
if value in result[key]:
result[key][value].append(source)
else:
result[key][value] = [source]
if isinstance(value, typing.Hashable):
if value in result[key]:
result[key][value].append(source)
else:
result[key][value] = [source]
return result


Expand Down

0 comments on commit 7a31b4a

Please sign in to comment.