Skip to content

Commit

Permalink
fixed create_label issue trying to update label
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbruder committed Jan 30, 2024
1 parent 46e2cea commit d59aae3
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions create_label.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import requests
from update_label import update_label
from config import base_url

def create_label():
Expand Down Expand Up @@ -35,15 +34,5 @@ def create_label():
if response.status_code == 201: # 201 Created is standard response for successful HTTP POST requests
label = response.json()['groups'][0]
print(f"Label '{label['name']}' created successfully. ID: {label['groupId']}, Type: {label['type']}")
print("Enter 'u' to update this label, or 'b' to go back to the label manager.")
while True:
next_action = input("Enter your choice: ")
if next_action.lower() == 'b':
return
elif next_action.lower() == 'u':
update_label(label['groupId'])
break
else:
print("Invalid choice. Please enter 'u' or 'b'.")
else:
print("Error creating label: received status code", response.status_code)

0 comments on commit d59aae3

Please sign in to comment.