check if input values of seeder are greater than 0

This commit is contained in:
iLLiCiTiT 2020-01-05 14:26:13 +01:00
parent 0024688a44
commit 080f1f6819

View file

@ -270,6 +270,10 @@ class SeedDebugProject(BaseAction):
except ValueError:
asset_count = 0
if asset_count <= 0:
self.log.debug("No assets to create")
return
main_entity = self.session.create("Folder", {
"name": "Assets",
"parent": project
@ -322,6 +326,18 @@ class SeedDebugProject(BaseAction):
except ValueError:
shots_count = 0
# Check if both are higher than 0
missing = []
if seq_count <= 0:
missing.append("sequences")
if shots_count <= 0:
missing.append("shots")
if missing:
self.log.debug("No {} to create".format(" and ".join(missing)))
return
# Create Folder "Shots"
main_entity = self.session.create("Folder", {
"name": "Shots",