cosmin/stashy

Documentation for update calls

peflo opened this issue · 0 comments

peflo commented

I spent a while banging my head on this so it might be worth updating the documentation -
I was trying to update a project description and it was reporting no error, but was not updating the project. After some trial and error I realized my problem - I was running:
project = stash.projects.get('TEST')
project.update(description='stashy test')

when what I needed to be doing was:
project - stash.projects['TEST']
project.update(description='stashy test')

Since the get returns a dict, update is a valid command and it reports success. Inspecting the 'project' object showed the update, but of course it wasn't actually sending anything to the server. It's perfectly valid behavior, just wasn't what I was expecting based on the description in the API - an example of an update call in the docs would have saved me some puzzlement.