Type on mediaobject; set probably alive on person edit
svn: r19673
This commit is contained in:
parent
bbd443ba7d
commit
baf98375f3
@ -622,7 +622,7 @@ class DbDjango(DbWriteBase, DbReadBase):
|
||||
data = cPickle.loads(base64.decodestring(media.cache))
|
||||
else:
|
||||
data = self.dji.get_media(media)
|
||||
return gen.lib.Media.create(data)
|
||||
return gen.lib.MediaObject.create(data)
|
||||
|
||||
def get_place_from_handle(self, handle):
|
||||
if handle in self.import_cache:
|
||||
|
@ -366,6 +366,7 @@ def process_person(request, context, handle, action, add_to=None): # view, edit,
|
||||
# check if valid:
|
||||
if nf.is_valid() and pf.is_valid() and sf.is_valid():
|
||||
# name.preferred and surname.primary get set False in the above is_valid()
|
||||
person.probably_alive = not bool(person.death)
|
||||
update_last_changed(person, request.user.username)
|
||||
person = pf.save()
|
||||
# Process data:
|
||||
@ -385,7 +386,6 @@ def process_person(request, context, handle, action, add_to=None): # view, edit,
|
||||
surname.primary = True # FIXME: why is this False?
|
||||
surname.save()
|
||||
dji.rebuild_cache(person)
|
||||
# FIXME: update probably_alive
|
||||
if add_to:
|
||||
item, handle = add_to
|
||||
model = dji.get_model(item)
|
||||
|
@ -12,6 +12,7 @@ from webapp.dbdjango import DbDjango
|
||||
from webapp.reports import import_file
|
||||
from webapp.libdjango import DjangoInterface, totime, todate
|
||||
from gen.datehandler import displayer, parser
|
||||
import gen.lib
|
||||
|
||||
db = DbDjango()
|
||||
dji = DjangoInterface()
|
||||
|
Loading…
Reference in New Issue
Block a user