Skip to content

Commit

Permalink
changed default in upload_constraint mine
Browse files Browse the repository at this point in the history
  • Loading branch information
zgoldberg22 committed Jan 29, 2024
1 parent a8961e4 commit 72f5f75
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/aerie_cli/aerie_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ def add_constraint_tag(self, constraint_id: int, tag_name: str):

return resp['returning'][0]

def upload_constraint(self, constraint, tags=[]):
def upload_constraint(self, constraint, tags=None):
upload_constraint_query = """
mutation CreateConstraint($constraint: constraint_insert_input!) {
createConstraint: insert_constraint_one(object: $constraint) {
Expand All @@ -1687,8 +1687,9 @@ def upload_constraint(self, constraint, tags=[]):
resp = self.aerie_host.post_to_graphql(upload_constraint_query, constraint=constraint)

#add each tag to constraint
for tag in tags:
new_tag_id = self.add_constraint_tag(resp["id"], tag)
if tags is not None:
for tag in tags:
new_tag_id = self.add_constraint_tag(resp["id"], tag)

return resp["id"]

Expand Down

0 comments on commit 72f5f75

Please sign in to comment.