Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Schema Config to include new geo fields and COG picklists #5257

Merged
merged 28 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c77a61c
Add migration for geo fields
sharadsw Sep 3, 2024
942b8a4
Update Schema Config README
sharadsw Sep 3, 2024
7ff1982
Add COG picklist migration
CarolineDenis Sep 4, 2024
c20eeb2
Add missing file
CarolineDenis Sep 4, 2024
87db686
Use correct picklist in cogtype business rule
sharadsw Sep 30, 2024
6a4171d
Merge remote-tracking branch 'origin/production' into issue-5215
sharadsw Oct 4, 2024
bee072c
Update discipline relations and change dependency
sharadsw Oct 4, 2024
e7f82b4
Update cogtype -> type picklist
sharadsw Oct 4, 2024
57e2489
Merge remote-tracking branch 'origin/production' into issue-5215
sharadsw Oct 8, 2024
0a5547d
Rename migration
sharadsw Oct 8, 2024
aabdc8f
merge issue-5317
sharadsw Oct 14, 2024
b37b222
Fix migration order
sharadsw Oct 17, 2024
7a3076e
remove old migration
sharadsw Oct 17, 2024
30c8e47
Merge remote-tracking branch 'origin/issue-5317' into issue-5215
sharadsw Oct 17, 2024
15a1b0d
fix frontend types
sharadsw Oct 17, 2024
84431d7
fix incorrect merge
sharadsw Oct 17, 2024
50e5166
fix migration dependency
sharadsw Oct 17, 2024
3c55587
fix env
maxpatiiuk Nov 30, 2023
858c59a
Merge branch 'issue-5317' into issue-5215
sharadsw Oct 17, 2024
0416d21
Improve reverting locale strings
sharadsw Oct 17, 2024
762dd82
Merge remote-tracking branch 'origin/issue-5215' into issue-5215
sharadsw Oct 17, 2024
dac4da4
Fix duplicate schema config entries
sharadsw Oct 18, 2024
1fcefb5
temp change revert
sharadsw Oct 18, 2024
b132374
Revert age migration
sharadsw Oct 21, 2024
723e536
Fix duplicate fields being added in migration
sharadsw Oct 21, 2024
58ef9de
Add changes for COG -> children
sharadsw Oct 22, 2024
9aeb7d3
Change formatter name to table name
sharadsw Oct 22, 2024
d8800df
Merge branch 'production' into issue-5215
sharadsw Oct 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ LOG_LEVEL=WARNING
# should only be used during development and troubleshooting and not
# during general use. Django applications leak memory when operated
# continuously in debug mode.
SP7_DEBUG=true
SP7_DEBUG=true
5 changes: 3 additions & 2 deletions specifyweb/businessrules/rules/cogtype_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
from specifyweb.businessrules.orm_signal_handler import orm_signal_handler
from specifyweb.specify.models import Picklist, Picklistitem

SYSTEM_COGTYPES_PICKLIST = "SystemCOGTypes"

@orm_signal_handler('pre_save', 'Collectionobjectgrouptype')
def cogtype_pre_save(cog_type):

# Ensure the cog_type type is validated by being the picklist.
# NOTE: Maybe add constraint on the cog_type name in the future.
default_cog_types_picklist = Picklist.objects.get(
name="Default Collection Object Group Types",
tablename="collectionobjectgrouptype",
name=SYSTEM_COGTYPES_PICKLIST,
collection=cog_type.collection
)
if Picklistitem.objects.filter(picklist=default_cog_types_picklist, value=cog_type.type).count() == 0:
Expand Down
Loading
Loading