I want to change the name for any database variable if its match abc.
def icall(modeladmin, request, queryset):
for pri in queryset:
print('from test:', pri.name, pri.title) # priting if working fine
if pri.name == 'abc': # loop is matching the condition
pri.update(name='zzz') ## the value is not getting update in DB
else:
print("gg not mached")
the pri.update(name='zzz')
os not working here.
can someone please help me to know the correct statement to update the database based on the if else condition.