misc: add |check_no_duplicates filter tag (#86530) #1108
Loading…
Reference in New Issue
No description provided.
Delete Branch "wip/86530-check-no-duplicates"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -1292,0 +1297,4 @@
if not isinstance(value, (type(None), tuple, list, set)):
get_publisher().record_error(_('|check_no_duplicates not used on a list (%s)') % value)
return False
return bool(len(value or []) == len(set(value or [])))
J'ai hésité concernant le None pour finalement décider de le traiter comme une liste vide (plutôt que lever une erreur).
WIP: misc: add |check_no_duplicates filter tag (#86530)to misc: add |check_no_duplicates filter tag (#86530)