Skip to content

Commit

Permalink
S:H:UserPreferences: login aus myconfig holen, nicht über S:D:M:Emplo…
Browse files Browse the repository at this point in the history
…yee->current

Verhindert einen Fehler, falls user preferences bei einer neuen DB abgefragt
werden, da es dann u.U. noch keine Einträge in der employee-Tabelle gibt.

Der Fehler trat auf beim Prüfen auf den erzwungenen Layout-Stil bei neuen DBs.
  • Loading branch information
bblessmann committed Oct 30, 2023
1 parent 7d472d9 commit d261d4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SL/Helper/UserPreferences.pm
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ sub _update {

### defaults stuff

sub init_login { SL::DB::Manager::Employee->current->login }
sub init_login { $::myconfig{login} }
sub init_namespace { ref $_[0] }
sub init_upgrade_callbacks { +{} }
sub init_current_version { version->parse((ref $_[0])->VERSION)->numify }
Expand Down

1 comment on commit d261d4f

@jfqd
Copy link

@jfqd jfqd commented on d261d4f Nov 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bblessmann Danke für Deinen Fix! Jetzt klappt der Login mit neuer (leerer) Datenbank!

Please sign in to comment.