mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 19:09:22 +02:00
cleanup
This commit is contained in:
parent
2ec3fa774d
commit
58957e1250
5 changed files with 5 additions and 13 deletions
|
@ -292,8 +292,6 @@ class User(AbstractUser):
|
|||
|
||||
def is_org_user(self, request):
|
||||
has_organization_feature_flag = flag_is_active(request, "organization_feature")
|
||||
user_portfolios = Portfolio.objects.filter(creator=self)
|
||||
|
||||
user_portfolios_exist = user_portfolios.exists()
|
||||
user_portfolios_exist = Portfolio.objects.filter(creator=self).exists()
|
||||
|
||||
return has_organization_feature_flag and user_portfolios_exist
|
||||
|
|
|
@ -4,10 +4,6 @@
|
|||
|
||||
{% block title %} Home | {% endblock %}
|
||||
|
||||
{% comment %}
|
||||
home and portfolio_base test for is_authenticated
|
||||
{% endcomment %}
|
||||
|
||||
{% block content %}
|
||||
<main id="main-content" class="grid-container">
|
||||
{% if user.is_authenticated %}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% comment %}
|
||||
home and portfolio_base test for is_authenticated
|
||||
{% endcomment %}
|
||||
|
||||
{% block wrapper %}
|
||||
<div id="wrapper">
|
||||
{% block content %}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import logging
|
||||
from django.http import JsonResponse
|
||||
from django.core.paginator import Paginator
|
||||
from registrar.models import UserDomainRole, Domain
|
||||
|
@ -5,6 +6,8 @@ from django.contrib.auth.decorators import login_required
|
|||
from django.urls import reverse
|
||||
from django.db.models import Q
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@login_required
|
||||
def get_domains_json(request):
|
||||
|
@ -101,6 +104,7 @@ def serialize_domain(domain):
|
|||
suborganization_name = suborganization.name
|
||||
except Domain.domain_info.RelatedObjectDoesNotExist:
|
||||
domain_info = None
|
||||
logger.debug(f'Issue in domains_json: We could not find domain_info for {domain}')
|
||||
|
||||
return {
|
||||
"id": domain.id,
|
||||
|
|
|
@ -7,8 +7,6 @@ def index(request):
|
|||
context = {}
|
||||
|
||||
if request.user.is_authenticated:
|
||||
context["has_organization_feature_flag"] = flag_is_active(request, "organization_feature")
|
||||
|
||||
# This controls the creation of a new domain request in the wizard
|
||||
request.session["new_request"] = True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue