2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

Ignore MissingRate errors (#8420)

* Improved permission checking for data importing

- Permission checks on the imported model type

* Improved validation for DateField

* Ignore MissingRate errors

- Do not send these to sentry
This commit is contained in:
Oliver 2024-11-03 18:23:34 +11:00 committed by GitHub
parent abad36786f
commit c9079d9a0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,7 @@ from django.http import Http404
import rest_framework.exceptions import rest_framework.exceptions
import sentry_sdk import sentry_sdk
from djmoney.contrib.exchange.exceptions import MissingRate
from sentry_sdk.integrations.django import DjangoIntegration from sentry_sdk.integrations.django import DjangoIntegration
import InvenTree.version import InvenTree.version
@ -27,6 +28,7 @@ def sentry_ignore_errors():
""" """
return [ return [
Http404, Http404,
MissingRate,
ValidationError, ValidationError,
rest_framework.exceptions.AuthenticationFailed, rest_framework.exceptions.AuthenticationFailed,
rest_framework.exceptions.NotAuthenticated, rest_framework.exceptions.NotAuthenticated,

View File

@ -62,7 +62,7 @@ export default function DateField({
ref={field.ref} ref={field.ref}
type={undefined} type={undefined}
error={error?.message} error={error?.message}
value={dateValue} value={dateValue ?? null}
clearable={!definition.required} clearable={!definition.required}
onChange={onChange} onChange={onChange}
valueFormat={valueFormat} valueFormat={valueFormat}