def object_extend(self, obj: Citation, args: Dict) -> Citation: """Extend citation attributes as needed.""" if "extend" in args: db_handle = self.db_handle obj.extended = get_extended_attributes(db_handle, obj, args) if "all" in args["extend"] or "source" in args["extend"]: obj.extended["source"] = get_source_by_handle( db_handle, obj.source_handle, args) return obj
def object_extend(self, obj: Citation, args: Dict, locale: GrampsLocale = glocale) -> Citation: """Extend citation attributes as needed.""" if "profile" in args: obj.profile = get_citation_profile_for_object( self.db_handle, obj, args["profile"]) if "extend" in args: obj.extended = get_extended_attributes(self.db_handle, obj, args) if "all" in args["extend"] or "source_handle" in args["extend"]: obj.extended["source"] = get_source_by_handle( self.db_handle, obj.source_handle, args) return obj