Merge pull request #3 from mikebirdgeneau/patch-1
Some checks are pending
website / build (push) Waiting to run
website / deploy (push) Blocked by required conditions

MInor update in `remove` method of `Label`
This commit is contained in:
hwelch-fle 2024-01-16 23:36:19 -05:00 committed by GitHub
commit 5c5d03c309
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -578,7 +578,7 @@ class Label(Controller):
raise InvalidToken("Please provide a project, board, label name")
if card_id:
label_id = [label['id'] for label in Card(self.instance).get_labels(oid=card_id) if label['name'] == label_name][0]
return super().delete(f"/api/cards/{card_id}/labels/{label['item']['id']}")
return super().delete(f"/api/cards/{card_id}/labels/{label_id}")
if not (card_name and list_name):
raise InvalidToken("Please provide a card and list name")
card_con = Card(self.instance)
@ -802,4 +802,4 @@ class User(Controller):
class InvalidToken(Exception):
"""General Error for invalid API inputs
"""
pass
pass