Skip to content

Commit

Permalink
Update client/ayon_traypublisher/addon.py
Browse files Browse the repository at this point in the history
Co-authored-by: Roy Nieterau <[email protected]>
  • Loading branch information
robin-ynput and BigRoy authored Oct 28, 2024
1 parent 06f1580 commit bd7840a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/ayon_traypublisher/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ def ingestcsv(
# Allow user override through AYON_USERNAME when
# current connection is made through a service user.
username = os.environ.get("AYON_USERNAME")
con = ayon_api.get_server_api_connection()
if username and con.is_service_user():
con.set_default_service_username(username)
if username:
con = ayon_api.get_server_api_connection()
if con.is_service_user():
con.set_default_service_username(username)

# use Path to check if csv_filepath exists
if not Path(filepath).exists():
Expand Down

0 comments on commit bd7840a

Please sign in to comment.