Here's a brief description of what I'm trying to do:
- get a field's value
- multiply that value by a constant
- update the field with the adjusted value
I am using a nice wrapper found here: https://github.com/hiway/pipedrive-api
Here is my code:
from pipedrive import Pipedrive
pd = Pipedrive('API_token')
# ^ insert API token
EAAR = pd.deals.get(id=693) ## parse info from given deal/field
Current_value = float(EAAR.value) ## convert value to decimal
print 'Previous value was ', Current_value
New_value = Current_value * 0.96
print 'New Value is ', New_value
pd.deals.put({
id:693,
'value': New_value})
EAAR2 = pd.deals.get(id=693)
print EAAR2.value
So expected output would be:
>>>Previous value was 5.0
>>>New Value is 4.8
>>>4.8
However, I'm getting:
>>>Previous value was 5.0
>>>New Value is 4.8
>>>5
Any ideas would be greatly appreciated!