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

Include a nodegroup's graph as nodegroup.graphid #11397

Draft
wants to merge 11 commits into
base: dev/8.0.x
Choose a base branch
from

Conversation

whatisgalen
Copy link
Member

@whatisgalen whatisgalen commented Aug 23, 2024

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

Issues Solved

Closes #11396

Checklist

  • I targeted one of these branches:
    • dev/8.0.x (under development): features, bugfixes not covered below
    • dev/7.6.x (under development): features, bugfixes not covered below
    • dev/7.5.x (main support): regressions, crashing bugs, security issues, major bugs in new features
    • dev/6.2.x (extended support): major security issues, data loss issues
  • I added a changelog in arches/releases
  • I submitted a PR to arches-docs (if appropriate)
  • Unit tests pass locally with my changes
  • I added tests that prove my fix is effective or that my feature works
  • My test fails on the target branch

Accessibility Checklist

Developer Guide

Topic Changed Retested
Color contrast
Form fields
Headings
Links
Keyboard
Responsive Design
HTML validation
Screen reader

Ticket Background

  • Sponsored by:
  • Found by: @
  • Tested by: @
  • Designed by: @

Further comments

@whatisgalen whatisgalen marked this pull request as draft August 23, 2024 22:19
@whatisgalen whatisgalen marked this pull request as ready for review August 23, 2024 23:48
@whatisgalen whatisgalen changed the title 11396 nodegroup graphid fk Include a nodegroup's graph as nodegroup.graphid Aug 23, 2024
@whatisgalen whatisgalen changed the base branch from dev/7.6.x to dev/8.0.x August 23, 2024 23:55
@whatisgalen whatisgalen marked this pull request as draft August 27, 2024 19:54
@jacobtylerwalls jacobtylerwalls linked an issue Oct 1, 2024 that may be closed by this pull request
Copy link
Member

@jacobtylerwalls jacobtylerwalls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@@ -715,6 +715,9 @@ class NodeGroup(models.Model):
null=True,
on_delete=models.CASCADE,
) # Allows nodegroups within nodegroups
graph = models.ForeignKey(
GraphModel, db_column="graphid", blank=True, null=True, on_delete=models.CASCADE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this blank=False in order to add some friction?

@@ -715,6 +715,9 @@ class NodeGroup(models.Model):
null=True,
on_delete=models.CASCADE,
) # Allows nodegroups within nodegroups
graph = models.ForeignKey(
GraphModel, db_column="graphid", blank=True, null=True, on_delete=models.CASCADE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, null=True doesn't really gel with on_delete=cascade, so if it's only here to support preexisting cruft data, and we already have a major version bump, maybe we just add a command to manage.py validate that deletes cruft nodegroups, and say you have to run that fix before upgrading to 8? WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add graph foreign key to nodegroup
2 participants