mirror of
https://github.com/iluvcapra/ptulsconv.git
synced 2025-12-31 17:00:46 +00:00
Reorganized commands a little
This commit is contained in:
@@ -11,7 +11,7 @@ class ValidationError:
|
||||
return f"{self.message}: event at {self.event['PT.Clip.Start']} on track {self.event['PT.Track.Name']}"
|
||||
|
||||
def validate_unique_count(input_dict, field='Title', count=1):
|
||||
values = set(list(map(lambda e: e[field], input_dict['events'])))
|
||||
values = set(list(map(lambda e: e.get(field, None), input_dict['events'])))
|
||||
if len(values) > count:
|
||||
yield ValidationError(message="Field {} has too many values (max={}): {}".format(field, count, values))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user