Open unformatt opened 5 years ago
As a workaround, I created a unicode
subclass with an id
property that will work with both create and update card methods:
class TrelloLabel(unicode):
@property
def id(self):
return unicode(self)
labels = [TrelloLabel('foo'), TrelloLabel('bar')]
# for creating card
print ','.join(labels)
# for updating card
print ','.join(t.id for t in labels)
_set_remote_attribute
to update a card wants a list of label idsadd_card
wants a list of objects withid
property on each objectadd_card
doc string saysHowever, doesn't seem to be true because it expects objects with
id
property:This makes it noodley to generalize code around managing labels via Trello API.
Mind if I submit a PR that supports both list of labels as ids and as objects with id property? Else a "fix" would not be backwards compatible.
e.g.