fix panic on export shared

Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
Ronni Skansing
2025-10-14 18:28:24 +02:00
parent a6374bd976
commit 4914bbeebb
+3 -1
View File
@@ -227,7 +227,9 @@ func (r *Recipient) GetByCompanyID(
) (*model.Result[model.Recipient], error) {
result := model.NewEmptyResult[model.Recipient]()
ae := NewAuditEvent("Recipient.GetByCompanyID", session)
ae.Details["id"] = id.String()
if id != nil {
ae.Details["id"] = id.String()
}
// check permissions
isAuthorized, err := IsAuthorized(session, data.PERMISSION_ALLOW_GLOBAL)
if err != nil && !errors.Is(err, errs.ErrAuthorizationFailed) {