Unable to Get Items By Column Value
Closed this issue · 2 comments
Hi!!
Apologies for bothering you again, but when I try to create a status column value (with a view to using this column value to search for items containing that column value), I receive:
File /moncli/columnvalue.py", line 682, in create_column_value
return StatusValue(id, title, label=kwargs['label'], settings=kwargs['settings'])
KeyError: 'settings'
The code that calls the create column value function is:
sync_val = create_column_value(id='status5', title='Sync', column_type=ColumnType.status, label='Sync Now')
Would you have any insight into what I'm doing wrong?
Thanks in advance :)
Hello @booey811, I am sorry to get back to you so late...
I will take a look into this. Please note that I would to make another minor release within the next week, and I will confirm that this issue is addressed.
All the best!
Hello @booey811.
I am sorry to get back to you late at this time. Other projects have occupied my time as of late.
To answer your question, the 'settings' key-word argument (kwargs) is the StatusSettings object created from the column's settings_str attribute. You can get this object by querying for the status column in question and passing in the settings attribute as a kwarg (settings=column.settings).
I would refrain from using this method if you have to, for the upgrades with the next minor release will address much of these underlying processes.
I will be closing this issue. Please feel free to reach out should you run into any additional problems.