Just a little script to find duplicate contact_mechanism entries on parties in tryton (how i run tryton stuff using ipython and proteus):
for p in Party.find():
cms = p.contact_mechanisms
if cms:
nos = []
for cm in cms:
if f'{cm.type} {cm.value_compact}' in nos:
print(f'duplicate contact mechanism {p.code=} {p.name=} {cm.value} {cm.type}')
else:
nos.append(f'{cm.type} {cm.value_compact}')
I just ran this from ipython to find out if there are a lot of duplicates - turns out i had barely anything (and i fixed that before re-running the imports for good in the old system).
Share on Twitter Share on Facebook
Comments
There are currently no comments
New Comment