mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-06 01:35:22 +02:00
Fix suborg issue
This commit is contained in:
parent
bd615a18a2
commit
60c4f54e63
3 changed files with 8 additions and 5 deletions
|
@ -250,6 +250,13 @@ class DomainSubOrganizationView(DomainFormBaseView):
|
|||
context_object_name = "domain"
|
||||
form_class = DomainSuborganizationForm
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
"""Adds custom context."""
|
||||
context = super().get_context_data(**kwargs)
|
||||
if self.object and self.object.domain_info and self.object.domain_info.sub_organization:
|
||||
context["suborganization_name"] = self.object.domain_info.sub_organization.name
|
||||
return context
|
||||
|
||||
def get_form_kwargs(self, *args, **kwargs):
|
||||
"""Add domain_info.organization_name instance to make a bound form."""
|
||||
form_kwargs = super().get_form_kwargs(*args, **kwargs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue