I have below code
exinfo = ExistingCardInfo.objects.filter(CustID=custid)
trail4 = exinfo[0].trail4
logger.debug(exinfo[0].trail4) # prints 1984
exinfo[0].trail4=3000
logger.debug(exinfo[0].trail4) # again prints 1984
Initially trail4 value is 1984. After I set trail4 value to 3000, i’m still getting 1984.
Is there anything wrong with above code?
Indexing a queryset reruns the query. Extract the single model, modify the field, save the model, then reindex.