creating a record attempting to update it shortly after causes error
The code provided in the screenshot gives me this error
from my understand its unable to find the record which was just created.?
5 Replies
Hey, as the error message suggests the record that was supposed to be updated was not found. Can you confirm if the record from (hosting_ticket) that you wish to update exists in the database?
added something to first check if it exists and apparently it doesn’t, what i don’t understand is the newTicket variable doesn’t return an error or anything and when using newTicket.id it returns the properly autoincremented id
Try logging the value of
newTicket
?turns out it was me being dumb and another file was deleting it right after it was being created
I am glad to hear that you figured out the cause of the issue 😄