Why is "no results to fetch" Django error when DB record created
code:
print('fork 1:'+str(self.mySessionID))
print('fork 2:'+str(myTimeStarted))
print('fork 3:'+str(self.__uid))
print('fork 4:'+str(why_started))
try:
MySessions.objects.create(
session_id=self.mySessionID,
when_started=myTimeStarted,
who_started=self.__uid,
why_started=str(why_started)
)
except Exception as Sht:
print("! "+str(Sht)) # ! no results to fetch
reply:
fork 1:59092
fork 2:2022-04-23 16:44:59.656620+03:00
fork 3:870806915
fork 4:WAITING FOR ::: vLVlhYyZvIM
! no results to fetch
(DB record had been created Ok though;)
the problem is, if I do NOT put it all in try-except, the script stops; and I do not want to put all of those db-record-creation blocks inside of try-except, that be stupid I think.) the question is WHY is this error being thrown?