Skip to content

Commit

Permalink
2.9 version of BaseModel
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Jun 25, 2024
1 parent 6842d8b commit 11eed9f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ckanext/harvest/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@
from ckan.model.domain_object import DomainObject
from ckan.model.package import Package

from ckantoolkit import BaseModel
try:
from ckan.plugins.toolkit import BaseModel
except ImportError:
# CKAN <= 2.9
from ckan.model.meta import metadata
from sqlalchemy.ext.declarative import declarative_base

BaseModel = declarative_base(metadata=metadata)


UPDATE_FREQUENCIES = ["MANUAL", "MONTHLY", "WEEKLY", "BIWEEKLY", "DAILY", "ALWAYS"]
Expand Down

0 comments on commit 11eed9f

Please sign in to comment.