mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Raise PublishValidationError
This commit is contained in:
parent
84960826a6
commit
4749ac8040
1 changed files with 3 additions and 1 deletions
|
|
@ -1,5 +1,7 @@
|
|||
import pyblish.api
|
||||
|
||||
from openpype.pipeline.publish import PublishValidationError
|
||||
|
||||
|
||||
class ValidateCurrentSaveFile(pyblish.api.ContextPlugin):
|
||||
"""File must be saved before publishing"""
|
||||
|
|
@ -12,4 +14,4 @@ class ValidateCurrentSaveFile(pyblish.api.ContextPlugin):
|
|||
|
||||
current_file = context.data["currentFile"]
|
||||
if not current_file:
|
||||
raise RuntimeError("File not saved")
|
||||
raise PublishValidationError("File not saved")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue