* src/GrampsDb/_GrampsDbBase.py: prevent null event types and
attribute types from being added * src/Editors/_EditAttribute.py: prevent null attribute types * src/Editors/_EditEvent.py: prevent null attribute types * src/AutoComp.py: filter out empty strings * src/ImgManip.py: check for file before attempting thumbnailer svn: r6898
This commit is contained in:
@@ -135,6 +135,14 @@ class EditAttribute(EditSecondary):
|
||||
Called when the OK button is pressed. Gets data from the
|
||||
form and updates the Attribute data structure.
|
||||
"""
|
||||
t = self.obj.get_type()
|
||||
|
||||
if t.is_custom() and str(t) == '':
|
||||
from QuestionDialog import ErrorDialog
|
||||
ErrorDialog(
|
||||
_("Cannot save attribute"),
|
||||
_("The attribute type cannot be empty"))
|
||||
return
|
||||
if self.callback:
|
||||
self.callback(self.obj)
|
||||
self.close()
|
||||
|
||||
Reference in New Issue
Block a user