Added schema to Tag

This commit is contained in:
Doug Blank 2016-01-30 14:44:39 -05:00
parent 3b1ff1e30f
commit abd69fbebd
2 changed files with 15 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class HandleClass(str):
@classmethod
def get_schema(cls):
from gramps.gen.lib import (Person, Family, Event, Place, Source,
Media, Repository, Note, Citation)
Media, Repository, Note, Citation, Tag)
tables = {
"Person": Person,
"Family": Family,
@ -39,6 +39,7 @@ class HandleClass(str):
"Repository": Repository,
"Note": Note,
"Citation": Citation,
"Tag": Tag,
}
return tables[cls.classname].get_schema()

View File

@ -101,6 +101,19 @@ class Tag(TableObject):
self.change) = data
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):
"""
Return the list of all textual attributes of the object.