I have a function
def update_field():
...
...
book.country = country_id
...
I have the same piece of code in several places and I need to make a separate function for it. For example
def update_field(obj_field):
...
...
obj_field = country_id
...
but when I try to call the function it doesn't work
country = book.country
update_field(country)