mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Updates match_aov_pattern() logic to handle empty regex
Using `is not None` to simplify code and handle empty regex cases. Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
parent
2d038efde5
commit
995ff7b94a
1 changed files with 3 additions and 6 deletions
|
|
@ -19,9 +19,6 @@ def match_aov_pattern(host_name, aov_patterns, render_file_name):
|
|||
bool: Review state for rendered file (render_file_name).
|
||||
"""
|
||||
aov_pattern = aov_patterns.get(host_name, [])
|
||||
if aov_pattern:
|
||||
if re.match(aov_pattern, render_file_name):
|
||||
preview = True
|
||||
return preview
|
||||
else:
|
||||
return False
|
||||
if not aov_pattern:
|
||||
return False
|
||||
return re.match(aov_pattern, render_file_name) is not None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue