Verified Commit 85aa40ae authored by Jakob Moser's avatar Jakob Moser
Browse files

Reorder

parent 68faf7d7
Loading
Loading
Loading
Loading
+3 −3
Changes for portal/api/auth.py: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -47,11 +47,11 @@ def require_valid(credential_type):
            # Determine which credentials to use
            credentials = {User: g.user, Key: g.key}.get(credential_type)

            if credentials is not None:
            if credentials is None:
                return unauthorized()
            else:
                # If g.user or g.key is set, we can trust they are valid.
                return route(**kwargs)
            else:
                return unauthorized()

        return protected_route