Skip to content

Commit

Permalink
global variable for entity type length
Browse files Browse the repository at this point in the history
  • Loading branch information
pudo committed Nov 21, 2024
1 parent 02fc976 commit 4707af2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion followthemoney/types/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from followthemoney.types.common import PropertyType
from followthemoney.rdf import URIRef, Identifier
from followthemoney.util import get_entity_id, sanitize_text
from followthemoney.util import ENTITY_ID_LEN, get_entity_id, sanitize_text
from followthemoney.util import gettext, defer as _
from followthemoney.exc import InvalidData

Expand All @@ -28,6 +28,7 @@ class EntityType(PropertyType):
plural = _("Entities")
matchable = True
pivot = True
max_length = ENTITY_ID_LEN

def validate(
self, value: str, fuzzy: bool = False, format: Optional[str] = None
Expand Down
1 change: 1 addition & 0 deletions followthemoney/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

MEGABYTE = 1024 * 1024
DEFAULT_LOCALE = "en"
ENTITY_ID_LEN = 200

T = TypeVar("T")
K = TypeVar("K")
Expand Down

0 comments on commit 4707af2

Please sign in to comment.