Skip to content

Commit

Permalink
Validate Database ignores attachment tables when looking for _ID fields
Browse files Browse the repository at this point in the history
  • Loading branch information
ethoms-usgs committed Apr 19, 2022
1 parent ffe5afe commit deb3bda
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Scripts/GeMS_ValidateDatabase_AGP2.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,8 +664,15 @@ def scanTable(table, fds=None):
idIndex = fieldNames.index(idField)
else:
hasIdField = False
if isExtension:
schemaErrorsMissingFields.append('<span class="table">'+table+'</span> lacks an _ID field')
# we don't care that ArcGIS-controlled tables do not have _ID fields. What is the point?
# Attachment tables are one kind but add others here as necessary
# not the best logic to depend on the name, but there is no table type that identifies
# these kinds of tables.
if not '__ATTACH' in table:
if isExtension:
schemaErrorsMissingFields.append('<span class="table">'+table+'</span> lacks an _ID field')
else:
pass
#Term field
if table == 'Glossary' and 'Term' in fieldNames:
hasTermField = True
Expand Down

0 comments on commit deb3bda

Please sign in to comment.