Skip to content

Commit

Permalink
make occtax marshmallow schemas importable
Browse files Browse the repository at this point in the history
  • Loading branch information
bouttier committed Oct 17, 2022
1 parent 81bfb62 commit f7e92ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/occtax/backend/occtax/schemas.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from datetime import datetime

from flask import current_app
from marshmallow import pre_load, post_load, pre_dump, fields, ValidationError
from marshmallow_sqlalchemy.convert import ModelConverter as BaseModelConverter
from shapely.geometry import asShape
Expand All @@ -15,6 +14,7 @@
from geonature.core.gn_meta.schemas import DatasetSchema
from geonature.core.gn_commons.schemas import MediaSchema
from geonature.core.taxonomie.schemas import TaxrefSchema
from geonature.utils.config import config
from pypnusershub.db.models import User
from pypn_habref_api.schemas import HabrefSchema

Expand Down Expand Up @@ -118,7 +118,7 @@ class Meta:
observers = MA.Nested(
ObserverSchema,
many=True,
allow_none=current_app.config.get("OCCTAX", {}).get("observers_txt", True),
allow_none=config.get("OCCTAX", {}).get("observers_txt", True),
)
digitiser = MA.Nested(ObserverSchema, dump_only=True)
dataset = MA.Nested(DatasetSchema, dump_only=True)
Expand Down

0 comments on commit f7e92ac

Please sign in to comment.