Verified Commit cece977a authored by Peter Stanko's avatar Peter Stanko
Browse files

Fixed errors

parent 5fc08ad8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ class ValidationError(PortalAPIError): # currently not used

class SubmissionRefusedError(PortalAPIError):
    def __init__(self, reason):
        super().__init__(code=429, message=reason)
        super().__init__(code=400, message=reason)


class WorkerNotAvailable(PortalServiceError):
@@ -154,7 +154,7 @@ class WorkerNotAvailable(PortalServiceError):
        self.message = message or "Worker is not available"


class SubmissionDiffTimeError(SubmissionRefusedError):
class SubmissionDiffTimeError(PortalAPIError):
    def __init__(self, project: Project, diff_time, user: User = None):
        log_user = f'by {user.log_name} ' if user else ''
        when = time.current_time() + diff_time