diff --git a/.github/DISCUSSION_TEMPLATE/feature_requests.yml b/.github/DISCUSSION_TEMPLATE/feature_requests.yml new file mode 100644 index 00000000000..695d78db331 --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/feature_requests.yml @@ -0,0 +1,46 @@ +title: "[Feature Request] " +labels: ["Feature Request"] +body: + - type: markdown + attributes: + value: | + Thank you for your interest in improving this project! Please fill out the following sections to help us understand your feature request better. + - type: textarea + id: problem-description + attributes: + label: Is your feature request related to a problem? Please describe. + description: "A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]" + value: | + ... + render: bash + validations: + required: true + - type: textarea + id: solution-description + attributes: + label: Describe the solution you'd like + description: "A clear and concise description of what you want to happen." + value: | + ... + render: bash + validations: + required: true + - type: textarea + id: alternatives-considered + attributes: + label: Describe alternatives you've considered + description: "A clear and concise description of any alternative solutions or features you've considered." + value: | + ... + render: bash + - type: input + id: reported-by + attributes: + label: Reported By + description: "Name of institution" + validations: + required: true + - type: markdown + attributes: + value: | + Thank you for your feedback! We appreciate your suggestions and will review them as soon as possible. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 8bc23e696fa..7d6665b8e1b 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Feature request about: Suggest an idea for this project title: '' -labels: 1 - Request +labels: 1 - Enhancement assignees: '' --- diff --git a/specifyweb/specify/api.py b/specifyweb/specify/api.py index ca704b71db8..13590a6662d 100644 --- a/specifyweb/specify/api.py +++ b/specifyweb/specify/api.py @@ -809,8 +809,8 @@ def update_obj(collection, agent, name: str, id, version, data: Dict[str, Any], else: obj.modifiedbyagent = agent - bump_version(obj, version) _handle_special_update_priors(obj, data) + bump_version(obj, version) obj.save(force_update=True) auditlog.update(obj, agent, parent_obj, dirty) for dep in dependents_to_delete: @@ -843,6 +843,8 @@ def bump_version(obj, version) -> None: manager = obj.__class__._base_manager updated = manager.filter(pk=obj.pk, version=version).update(version=version+1) if not updated: + if obj._meta.model_name in {'collectionobjectgroupjoin'}: + return # TODO: temporary solution to allow for multiple updates to the same cojo object raise StaleObjectException("%s object %d is out of date" % (obj.__class__.__name__, obj.id)) obj.version = version + 1 @@ -1078,6 +1080,8 @@ def _save_cojo_prior(obj): """ if obj._meta.model_name in {'collectionobject', 'collectionobjectgroup'} and hasattr(obj, 'cojo'): obj.cojo.save() + elif obj._meta.model_name in {'collectionobjectgroupjoin'}: + obj.save() def _handle_special_save_priors(obj): """