When checking for duplicate values, the get_allowed_values method ensures we don't set the same values as any of the existing values. However, it doesn't check against new ones we make up since the new ones are added to the used set which is in local scope but should be added to the class scoped set self.init_values[field]
This line isn't the problem causing the duplicates, it's an issue with the parallel option. Anything run with parallel > 1 seems to fail due to duplicated entries
When checking for duplicate values, the
get_allowed_values
method ensures we don't set the same values as any of the existing values. However, it doesn't check against new ones we make up since the new ones are added to theused
set which is in local scope but should be added to the class scoped setself.init_values[field]