We might have the special faction id but not the faction on update. Probably Fixes #722.
This commit is contained in:
parent
5c9c2a6123
commit
442bbd1139
@ -159,16 +159,17 @@ public class UpdateUtil
|
||||
// Get the coll.
|
||||
FactionColl coll = FactionColl.get();
|
||||
|
||||
// Get the faction and detach it
|
||||
Faction faction = coll.detachId(from);
|
||||
if (faction == null) return;
|
||||
coll.syncId(from);
|
||||
|
||||
// A faction may already be occupying the to-id.
|
||||
// We must remove it to make space for renaming.
|
||||
// This faction is simply an auto-created faction with no references yet.
|
||||
coll.detachId(to);
|
||||
coll.syncId(to);
|
||||
|
||||
// Get the faction and detach it
|
||||
Faction faction = coll.detachId(from);
|
||||
coll.syncId(from);
|
||||
|
||||
// Attach it
|
||||
coll.attach(faction, to);
|
||||
coll.syncId(to);
|
||||
|
Loading…
Reference in New Issue
Block a user