Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/issue-114-backend' into issue-5185
Browse files Browse the repository at this point in the history
  • Loading branch information
CarolineDenis committed Oct 16, 2024
2 parents 656518e + eb724c9 commit b4a910d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions specifyweb/context/schema_localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def get_schema_localization(collection, schematype, lang):
cfields = ('format', 'ishidden', 'isuiformatter', 'picklistname', 'type', 'aggregator', 'defaultui', 'name', 'desc')

containers = {
row[0]: dict(items={}, **{field: row[i+1] for i, field in enumerate(cfields)})
row[0].lower(): dict(items={}, **{field: row[i+1] for i, field in enumerate(cfields)})
for row in cursor.fetchall()
}

Expand Down Expand Up @@ -172,7 +172,7 @@ def get_schema_localization(collection, schematype, lang):
ifields = ('format', 'ishidden', 'isuiformatter', 'picklistname', 'type', 'isrequired', 'weblinkname', 'name', 'desc')

for row in cursor.fetchall():
containers[row[0]]['items'][row[1].lower()] = {field: row[i+2] for i, field in enumerate(ifields)}
containers[row[0].lower()]['items'][row[1].lower()] = {field: row[i+2] for i, field in enumerate(ifields)}

return containers

Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function UniquenessRuleRow({
<Input.Text
form={formId}
forwardRef={index === 0 ? validationRef : undefined}
isReadOnly={!(index === 0 && hasDuplicates)}
isReadOnly
key={index}
value={
(fields.find(({ name }) => name === field) ??
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function UniquenessRuleScope({
isDefault: false,
isEnabled: true,
isRelationship: true,
optionLabel: relationship.localization.name!,
optionLabel: relationship.localization.name ?? relationship.name,
tableName: relationship.relatedTable.name,
},
])
Expand Down

0 comments on commit b4a910d

Please sign in to comment.