Bug 239263: Avoid hazard in User->groups by switching to main DB for rederive

r=jouni
a=justdave
This commit is contained in:
bugreport%peshkin.net 2004-05-14 13:55:45 +00:00
parent 8e6664dfb4
commit d3a014761e

View File

@ -107,7 +107,14 @@ sub _create {
$id);
if ($result) {
my $is_main_db;
unless ($is_main_db = Bugzilla->dbwritesallowed()) {
Bugzilla->switch_to_main_db();
}
$self->derive_groups($tables_locked_for_derive_groups);
unless ($is_main_db) {
Bugzilla->switch_to_shadow_db();
}
}
return $self;