mirror of
https://github.com/evennia/evennia.git
synced 2026-04-05 07:27:17 +02:00
Fixed a database referene bug that would remove ForeignKey referenced objects when reverse referenced through something like db_home (this defaults to CASCADE mode, is now SET_NULL). Also fixed some other minor things.
This commit is contained in:
parent
787f93c4c0
commit
7d0ff9c71c
4 changed files with 12 additions and 17 deletions
|
|
@ -170,7 +170,6 @@ def create_object(typeclass=None, key=None, location=None,
|
|||
if aliases:
|
||||
new_object.aliases.add(aliases)
|
||||
|
||||
# perform a move_to in order to display eventual messages.
|
||||
if home:
|
||||
new_object.home = home
|
||||
else:
|
||||
|
|
@ -182,6 +181,7 @@ def create_object(typeclass=None, key=None, location=None,
|
|||
raise _ObjectDB.DoesNotExist("CHARACTER_DEFAULT_HOME (= '%s') does not exist, or the setting is malformed." %
|
||||
settings.CHARACTER_DEFAULT_HOME)
|
||||
|
||||
# perform a move_to in order to display eventual messages.
|
||||
if location:
|
||||
new_object.move_to(location, quiet=True)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue