Check for empty handle in private proxy

This commit is contained in:
Nick Hall 2015-12-11 18:29:54 +00:00
parent 4a0ce62361
commit ded6869a2a

View File

@ -647,6 +647,7 @@ def sanitize_lds_ord(db, lds_ord):
new_lds_ord.set_date_object(lds_ord.get_date_object())
place_handle = lds_ord.get_place_handle()
if place_handle:
place = db.get_place_from_handle(place_handle)
if place and not place.get_privacy():
new_lds_ord.set_place_handle(place_handle)
@ -1020,6 +1021,7 @@ def sanitize_event(db, event):
copy_attributes(db, event, new_event)
place_handle = event.get_place_handle()
if place_handle:
place = db.get_place_from_handle(place_handle)
if place and not place.get_privacy():
new_event.set_place_handle(place_handle)