Add missing EventRef.get_schema()
This commit is contained in:
parent
e16e772057
commit
a3c0ff5c18
@ -108,8 +108,32 @@ class EventRef(PrivacyBase, NoteBase, AttributeBase, RefBase,
|
|||||||
"role": self.__role.to_struct()
|
"role": self.__role.to_struct()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_schema(cls):
|
||||||
|
"""
|
||||||
|
Returns the schema for EventRef.
|
||||||
|
|
||||||
|
:returns: Returns a dict containing the fields to types.
|
||||||
|
:rtype: dict
|
||||||
|
"""
|
||||||
|
from .attribute import Attribute
|
||||||
|
return {
|
||||||
|
"private": bool,
|
||||||
|
"note_list": [Handle("Note", "NOTE-HANDLE")],
|
||||||
|
"attribute_list": [Attribute],
|
||||||
|
"ref": Handle("Event", "EVENT-HANDLE"),
|
||||||
|
"role": EventRoleType,
|
||||||
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_labels(cls, _):
|
def get_labels(cls, _):
|
||||||
|
"""
|
||||||
|
Given a translation function, returns the labels for
|
||||||
|
each field of this object.
|
||||||
|
|
||||||
|
:returns: Returns a dict containing the fields to labels.
|
||||||
|
:rtype: dict
|
||||||
|
"""
|
||||||
return {
|
return {
|
||||||
"private": _("Private"),
|
"private": _("Private"),
|
||||||
"note_list": _("Notes"),
|
"note_list": _("Notes"),
|
||||||
@ -252,4 +276,3 @@ class EventRef(PrivacyBase, NoteBase, AttributeBase, RefBase,
|
|||||||
"""
|
"""
|
||||||
self.__role.set(role)
|
self.__role.set(role)
|
||||||
role = property(get_role, set_role, None, 'Returns or sets role property')
|
role = property(get_role, set_role, None, 'Returns or sets role property')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user