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()
|
||||
}
|
||||
|
||||
@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
|
||||
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 {
|
||||
"private": _("Private"),
|
||||
"note_list": _("Notes"),
|
||||
@ -252,4 +276,3 @@ class EventRef(PrivacyBase, NoteBase, AttributeBase, RefBase,
|
||||
"""
|
||||
self.__role.set(role)
|
||||
role = property(get_role, set_role, None, 'Returns or sets role property')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user