mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-03-16 19:07:48 +00:00
Update AuditTrailRepository to improve user handling and fix nullable user type in AuditTrail
- Changed `getUser` method in `AuditTrail` to allow null values by updating the return type to `?User`. - Updated `insert` method in `AuditTrailRepository` to handle nullable users, ensuring the `user_id` parameter is set only when applicable. - Improved code robustness by adding null-check logic for user assignment in the SQL query.
This commit is contained in:
@@ -54,7 +54,7 @@ class AuditTrail
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getUser(): User
|
||||
public function getUser(): ?User
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user