Merge pull request #277 from makeplane/sync/ce-ee

sync: merge conflicts need to be resolved
This commit is contained in:
sriram veeraghanta
2024-05-20 12:59:44 +05:30
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -88,7 +88,7 @@ class MagicCodeProvider(CredentialAdapter):
if data["current_attempt"] > 2:
email = str(self.key).replace("magic_", "", 1)
if User.objects.exists(email=email):
if User.objects.filter(email=email).exists():
raise AuthenticationException(
error_code=AUTHENTICATION_ERROR_CODES[
"EMAIL_CODE_ATTEMPT_EXHAUSTED_SIGN_IN"
@@ -144,7 +144,7 @@ class MagicCodeProvider(CredentialAdapter):
return
else:
email = str(self.key).replace("magic_", "", 1)
if User.objects.exists(email=email):
if User.objects.filter(email=email).exists():
raise AuthenticationException(
error_code=AUTHENTICATION_ERROR_CODES[
"INVALID_MAGIC_CODE_SIGN_IN"
@@ -162,7 +162,7 @@ class MagicCodeProvider(CredentialAdapter):
)
else:
email = str(self.key).replace("magic_", "", 1)
if User.objects.exists(email=email):
if User.objects.filter(email=email).exists():
raise AuthenticationException(
error_code=AUTHENTICATION_ERROR_CODES[
"EXPIRED_MAGIC_CODE_SIGN_IN"

View File

@@ -9,7 +9,7 @@ export const ADMIN_BASE_PATH = process.env.NEXT_PUBLIC_ADMIN_BASE_PATH || "";
export const SPACE_BASE_URL = process.env.NEXT_PUBLIC_SPACE_BASE_URL || "";
export const SPACE_BASE_PATH = process.env.NEXT_PUBLIC_SPACE_BASE_PATH || "";
export const GOD_MODE_URL = encodeURI(`${ADMIN_BASE_URL}${ADMIN_BASE_PATH}`);
export const GOD_MODE_URL = encodeURI(`${ADMIN_BASE_URL}${ADMIN_BASE_PATH}/`);
export const debounce = (func: any, wait: number, immediate: boolean = false) => {
let timeout: any;