Skip to content

Commit

Permalink
Merge pull request #6059 from specify/issue-6042
Browse files Browse the repository at this point in the history
Add Tectonic Unit paleoContexts relationship to the datamodel
  • Loading branch information
melton-jason authored Jan 13, 2025
2 parents 27476ea + 37d5d28 commit f1aa17c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion specifyweb/frontend/js_src/lib/components/DataModel/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6809,5 +6809,8 @@ export type TectonicUnit = {
readonly parent: TectonicUnit;
};
readonly toManyDependent: RR<never, never>;
readonly toManyIndependent: { readonly acceptedChildren: RA<TectonicUnit> };
readonly toManyIndependent: {
readonly acceptedChildren: RA<TectonicUnit>;
readonly paleoContexts: RA<PaleoContext>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ export function QueryComboBox({
}
/>
)}
{hasSearchButton && (
{hasSearchButton && !field.isDependent() && (
<DataEntry.Search
aria-pressed={state.type === 'SearchState'}
onClick={
Expand Down
1 change: 1 addition & 0 deletions specifyweb/specify/datamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8701,6 +8701,7 @@
Relationship(name='parent', type='many-to-one', required=True, relatedModelName='TectonicUnit', column='ParentID'),
Relationship(name='definition', type='many-to-one', required=True, relatedModelName='TectonicUnitTreeDef', column='TectonicUnitTreeDefID', otherSideName='treeEntries'),
Relationship(name='definitionItem', type='many-to-one', required=True, relatedModelName='TectonicUnitTreeDefItem', column='TectonicUnitTreeDefItemID', otherSideName='treeEntries'),
Relationship(name='paleoContexts', type='one-to-many',required=False, relatedModelName='PaleoContext', otherSideName='tectonicUnit'),
],
fieldAliases=[
{'vname':'acceptedParent', 'aname':'acceptedTectonicUnit'}
Expand Down

0 comments on commit f1aa17c

Please sign in to comment.