Skip to content

Commit

Permalink
Merge pull request #11 from nebula-contrib/fix
Browse files Browse the repository at this point in the history
Fix issue #10 fix vid type issue on INSERT
  • Loading branch information
wey-gu authored Feb 17, 2023
2 parents f6c0617 + 308bffb commit 4384d6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions nebula_carina/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Iterable

from nebula3.common.ttypes import Vertex, Tag, Edge
from pydantic import BaseModel
from pydantic import BaseModel, StrictStr, StrictInt
from pydantic.fields import ModelField
from pydantic.main import ModelMetaclass

Expand Down Expand Up @@ -186,7 +186,7 @@ class NebulaRecordModel(BaseModel, NebulaConvertableProtocol, metaclass=NebulaRe

class VertexModel(NebulaRecordModel):

vid: int | str
vid: StrictInt | StrictStr
objects = BaseVertexManager()

@classmethod
Expand Down Expand Up @@ -310,8 +310,8 @@ def get_sources(self, edge_type, src_vertex_model, *, distinct=False, limit: Lim


class EdgeModel(NebulaRecordModel):
src_vid: int | str
dst_vid: int | str
src_vid: StrictInt | StrictStr
dst_vid: StrictInt | StrictStr
ranking: int = 0
edge_type_name: str | None # for view only
edge_type: EdgeTypeModel # only one edge type
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='nebula-carina',
version='0.3.0',
version='0.3.1',
author='Sword Elucidator',
author_email='[email protected]',
url='https://github.com/SwordElucidator/nebula-carina',
Expand Down

0 comments on commit 4384d6b

Please sign in to comment.