Skip to content

Commit

Permalink
Restore unknown type check in DatabaseObject::fieldType
Browse files Browse the repository at this point in the history
  • Loading branch information
martinburchell committed Jul 18, 2023
1 parent 9bfd069 commit 46e31c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tablet_qt/db/databaseobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ bool DatabaseObject::hasField(const QString& fieldname) const

QMetaType DatabaseObject::fieldType(const QString& fieldname) const
{
if (!hasField(fieldname)) {
return QMetaType::UnknownType;
}

const Field& field = m_record[fieldname];
return field.type();
}
Expand Down

0 comments on commit 46e31c4

Please sign in to comment.