Closed boryn closed 1 year ago
@boryn
Your getActivitylogOptions()
Helped me
Thanks
Something similar occurs to me, I have this:
And when creating a customer it inserts this entry:
log_name | description | subject_id | subject_type | event | causer_id | causer_type | properties | batch_uuid |
---|---|---|---|---|---|---|---|---|
default | updated | 7 | App\Models\Customer | updated | bb00215f-7b0f-4e7e-9d50-1672ab3b0fee | App\Models\User\Types\TenantUser | { "old": { "nam... | null |
With the properties column containing this:
{
"old": {
"name": null
},
"attributes": {
"name": "The Coolest Company"
}
}
While I have never updated this record, only created. Is this a bug?
Edit:
Adding this to my customer model poses no changes in the issue described above. Even though I'm still not updating but creating this model. So it appears related to this issue.
protected static $recordEvents = ['updated'];
This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 7 days
Describe the bug
While logging activities on a model with soft deletes, having this setting (without logging
created
events):and
there are nulls logged for the
updated
event like this:It seems more like the
created
event being logged? Though I don't have it in the$recordEvents
attribute and in theactivity_log
table these rows are logged with theupdated
event.Expected behavior The "null" old values should not be logged at all for the
updated
event. Especially when there is null id.Screenshots
Versions (please complete the following information)