Skip to content

Commit d5ed37c

Browse files
committed
Rebase and use DataDict
Rebase onto the upstream/master, and use DataDict wrapper.
1 parent 6e3e0d5 commit d5ed37c

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

gramps/gen/lib/grampstype.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ def __get_str(cls, value, string):
247247
return cls._I2SMAP.get(value, _UNKNOWN)
248248

249249
@classmethod
250-
def get_str(cls, dict):
251-
return cls.__get_str(dict["value"], dict["string"])
250+
def get_str(cls, data):
251+
return cls.__get_str(data.value, data.string)
252252

253253
@classmethod
254254
def get_schema(cls):

gramps/gui/views/treemodels/eventmodel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def column_place(self, data):
145145
return ""
146146

147147
def column_type(self, data):
148-
return EventType.get_str(data["type"])
148+
return EventType.get_str(data.type)
149149

150150
def column_id(self, data):
151151
return data["gramps_id"]

gramps/gui/views/treemodels/familymodel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def sort_mother(self, data):
165165
return value
166166

167167
def column_type(self, data):
168-
return FamilyRelType.get_str(data["type"])
168+
return FamilyRelType.get_str(data.type)
169169

170170
def column_marriage(self, data):
171171
handle = data["handle"]

gramps/gui/views/treemodels/notemodel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def column_id(self, data):
118118

119119
def column_type(self, data):
120120
"""Return the type of the Note in readable format."""
121-
return NoteType.get_str(data["type"])
121+
return NoteType.get_str(data.type)
122122

123123
def column_preview(self, data):
124124
"""Return a shortend version of the Note's text."""

gramps/gui/views/treemodels/placemodel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def column_id(self, data):
188188
return data["gramps_id"]
189189

190190
def column_type(self, data):
191-
return PlaceType.get_str(data["place_type"])
191+
return PlaceType.get_str(data.place_type)
192192

193193
def column_code(self, data):
194194
return data["code"]

gramps/gui/views/treemodels/repomodel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def column_id(self, data):
134134
return data["gramps_id"]
135135

136136
def column_type(self, data):
137-
return RepositoryType.get_str(data["type"])
137+
return RepositoryType.get_str(data.type)
138138

139139
def column_name(self, data):
140140
return data["name"]

0 commit comments

Comments
 (0)