Skip to content

Commit

Permalink
Add internal comment fields to jasmin_services grants and requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
amanning9 committed Jul 29, 2024
1 parent b7e1092 commit a7c455c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
24 changes: 24 additions & 0 deletions jasmin_services/migrations/0025_add_internal_comment_fields.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 5.0.7 on 2024-07-29 14:40

import django_countries.fields
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("jasmin_services", "0024_grant_revoked_at_alter_behaviour_polymorphic_ctype"),
]

operations = [
migrations.AddField(
model_name="grant",
name="internal_comment",
field=models.TextField(blank=True, verbose_name="Internal nodes"),
),
migrations.AddField(
model_name="request",
name="internal_comment",
field=models.TextField(blank=True, verbose_name="Internal nodes"),
),
]
3 changes: 3 additions & 0 deletions jasmin_services/models/grant.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ class Meta:
"self", models.SET_NULL, null=True, blank=True, related_name="next_grant"
)

# Add a field for an internal comment about the grant.
internal_comment = models.TextField(blank=True, verbose_name="Internal nodes")

@property
def user(self):
return self.access.user
Expand Down
3 changes: 3 additions & 0 deletions jasmin_services/models/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ class Meta:
help_text=markdown_allowed(),
)

# Add a field for an internal comment about the grant.
internal_comment = models.TextField(blank=True, verbose_name="Internal nodes")

def __str__(self):
return "{} : {}".format(self.access, "INCOMPETE" if self.incomplete else self.state)

Expand Down

0 comments on commit a7c455c

Please sign in to comment.