Skip to content

Commit

Permalink
πŸ“ Add ValidateFields to ref
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyosun committed Nov 15, 2024
1 parent 7f2d525 commit f3cc457
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 11 deletions.
7 changes: 2 additions & 5 deletions lamindb/_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
Feature,
FeatureSet,
IsVersioned,
LinkORM,
Param,
Record,
Run,
Transform,
ULabel,
ValidateFields,
)
from lnschema_core.validation import FieldValidationError

Expand Down Expand Up @@ -177,10 +177,7 @@ def __init__(record: Record, *args, **kwargs):
init_self_from_db(record, existing_record)
return None
super(Record, record).__init__(**kwargs)
if record.__class__.__get_schema_name__() not in {
"core",
"bionty",
} and not isinstance(record, LinkORM):
if isinstance(record, ValidateFields):
# this will trigger validation against django validators
try:
if hasattr(record, "clean_fields"):
Expand Down
2 changes: 2 additions & 0 deletions lamindb/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
ParamValue
FeatureValue
InspectResult
ValidateFields
fields
Curators:
Expand Down Expand Up @@ -76,6 +77,7 @@
Registry,
TracksRun,
TracksUpdates,
ValidateFields,
)

from lamindb._curate import (
Expand Down
2 changes: 1 addition & 1 deletion sub/clinicore
2 changes: 1 addition & 1 deletion sub/findrefs
Submodule findrefs updated 1 files
+2 βˆ’1 findrefs/models.py
2 changes: 1 addition & 1 deletion sub/lnschema-core
2 changes: 1 addition & 1 deletion sub/ourprojects
Submodule ourprojects updated 1 files
+2 βˆ’1 ourprojects/models.py
2 changes: 1 addition & 1 deletion sub/wetlab
Submodule wetlab updated 1 files
+10 βˆ’10 wetlab/models.py

0 comments on commit f3cc457

Please sign in to comment.