mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
added warning message on ftrack url change
This commit is contained in:
parent
2e5f014788
commit
874479fde8
1 changed files with 15 additions and 0 deletions
|
|
@ -133,10 +133,22 @@ class FtrackModule(
|
|||
" Can't propagate changes to Ftrack server."
|
||||
))
|
||||
|
||||
ftrack_changes = changes.get("modules", {}).get("ftrack", {})
|
||||
url_change_msg = None
|
||||
if "ftrack_server" in ftrack_changes:
|
||||
url_change_msg = (
|
||||
"Ftrack URL was changed."
|
||||
" This change may need to restart OpenPype to take affect."
|
||||
)
|
||||
|
||||
try:
|
||||
session = self.create_ftrack_session()
|
||||
except Exception:
|
||||
self.log.warning("Couldn't create ftrack session.", exc_info=True)
|
||||
|
||||
if url_change_msg:
|
||||
raise SaveWarningExc(url_change_msg)
|
||||
|
||||
raise SaveWarningExc((
|
||||
"Saving of attributes to ftrack wasn't successful,"
|
||||
" try running Create/Update Avalon Attributes in ftrack."
|
||||
|
|
@ -210,6 +222,9 @@ class FtrackModule(
|
|||
" Try running Create/Update Avalon Attributes in ftrack."
|
||||
).format(", ".join(missing_attributes)))
|
||||
|
||||
if url_change_msg:
|
||||
raise SaveWarningExc(url_change_msg)
|
||||
|
||||
def on_project_settings_save(self, *_args, **_kwargs):
|
||||
"""Implementation of ISettingsChangeListener interface."""
|
||||
# Ignore
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue