Show all mnt objects on dashboard, too
This commit is contained in:
parent
6557250bc1
commit
2f3fa061af
|
@ -40,6 +40,10 @@ def profile(request):
|
|||
def dashboard(request):
|
||||
mnts = request.user.maintainer_set.all()
|
||||
ownMnts = request.user.maintainer_set.filter(rir=False, lir=False).all().distinct()
|
||||
# if account only has rir/lir objects, show them
|
||||
if ownMnts.count() == 0:
|
||||
ownMnts = mnts
|
||||
|
||||
asns = ASNumber.objects.filter(Q(mnt_by__in=ownMnts) | Q(mnt_lower__in=ownMnts)).distinct()
|
||||
inetnums = InetNum.objects.filter(Q(mnt_by__in=ownMnts) | Q(mnt_lower__in=ownMnts)).distinct()
|
||||
domains = Domain.objects.filter(mnt_by__in=mnts).distinct()
|
||||
|
|
Loading…
Reference in New Issue