Browse Source

Show all mnt objects on dashboard, too

Sebastian Lohff 2 years ago
parent
commit
2f3fa061af
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      dncore/views.py

+ 4
- 0
dncore/views.py View File

@@ -40,6 +40,10 @@ def profile(request):
40 40
 def dashboard(request):
41 41
 	mnts = request.user.maintainer_set.all()
42 42
 	ownMnts = request.user.maintainer_set.filter(rir=False, lir=False).all().distinct()
43
+	# if account only has rir/lir objects, show them
44
+	if ownMnts.count() == 0:
45
+		ownMnts = mnts
46
+
43 47
 	asns = ASNumber.objects.filter(Q(mnt_by__in=ownMnts) | Q(mnt_lower__in=ownMnts)).distinct()
44 48
 	inetnums = InetNum.objects.filter(Q(mnt_by__in=ownMnts) | Q(mnt_lower__in=ownMnts)).distinct()
45 49
 	domains = Domain.objects.filter(mnt_by__in=mnts).distinct()

Loading…
Cancel
Save