Added schema to Tag
This commit is contained in:
parent
3b1ff1e30f
commit
abd69fbebd
@ -28,7 +28,7 @@ class HandleClass(str):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def get_schema(cls):
|
def get_schema(cls):
|
||||||
from gramps.gen.lib import (Person, Family, Event, Place, Source,
|
from gramps.gen.lib import (Person, Family, Event, Place, Source,
|
||||||
Media, Repository, Note, Citation)
|
Media, Repository, Note, Citation, Tag)
|
||||||
tables = {
|
tables = {
|
||||||
"Person": Person,
|
"Person": Person,
|
||||||
"Family": Family,
|
"Family": Family,
|
||||||
@ -39,6 +39,7 @@ class HandleClass(str):
|
|||||||
"Repository": Repository,
|
"Repository": Repository,
|
||||||
"Note": Note,
|
"Note": Note,
|
||||||
"Citation": Citation,
|
"Citation": Citation,
|
||||||
|
"Tag": Tag,
|
||||||
}
|
}
|
||||||
return tables[cls.classname].get_schema()
|
return tables[cls.classname].get_schema()
|
||||||
|
|
||||||
|
@ -101,6 +101,19 @@ class Tag(TableObject):
|
|||||||
self.change) = data
|
self.change) = data
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_schema(cls):
|
||||||
|
"""
|
||||||
|
Return the schema for Tag
|
||||||
|
"""
|
||||||
|
return {
|
||||||
|
"handle": Handle("Tag", "TAG-HANDLE"),
|
||||||
|
"name": str,
|
||||||
|
"color": str,
|
||||||
|
"priority": int,
|
||||||
|
"change": int,
|
||||||
|
}
|
||||||
|
|
||||||
def get_text_data_list(self):
|
def get_text_data_list(self):
|
||||||
"""
|
"""
|
||||||
Return the list of all textual attributes of the object.
|
Return the list of all textual attributes of the object.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user