fix: add empty user to base

pull/115/head
shancheas 2024-11-13 14:29:35 +07:00
parent ad3e3593fd
commit 6807d00cbe
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ export abstract class BaseManager {
setUser() { setUser() {
try { try {
this.user = this.userProvider?.user; this.user = this.userProvider?.user ?? BLANK_USER;
} catch (error) { } catch (error) {
this.user = BLANK_USER; this.user = BLANK_USER;
} }

View File

@ -71,7 +71,7 @@ export abstract class BaseCreateManager<Entity> extends BaseManager {
} }
async publishEvents() { async publishEvents() {
this.eventBus.publish( this.eventBus?.publish(
new RecordLog({ new RecordLog({
id: this.result['id'], id: this.result['id'],
old: null, old: null,