diff --git a/authstats/api.py b/authstats/api.py index 6ec4896..b405455 100644 --- a/authstats/api.py +++ b/authstats/api.py @@ -61,7 +61,7 @@ def get_report_for_corp(request, report_id: int, corp_id: int): try: report = ReportResults.objects.get( corporation__corporation_id=corp_id, report_id=report_id) - if report.report.restricted and not request.user.has_perms("authstats.restricted_reports"): + if report.report.restricted and not request.user.has_perm("authstats.restricted_reports"): return 403, f"Access Denied to get_report_for_corp {report_id}/{corp_id} for {request.user}" if report.last_update < timezone.now() - timedelta(hours=1): run_report_for_corp.delay(corp_id, report_id)