Skip to content

Commit

Permalink
Add MIME type to ORM <> Schema converters and Core <> Schema converters
Browse files Browse the repository at this point in the history
  • Loading branch information
smokestacklightnin committed Jan 28, 2025
1 parent 23898f0 commit e53b180
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ragna/deploy/_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ def document(
user_id=user_id,
name=document.name,
metadata_=document.metadata,
mime_type=document.mime_type,
)

def source(self, source: schemas.Source) -> orm.Source:
Expand Down Expand Up @@ -358,7 +359,10 @@ def api_key(self, api_key: orm.ApiKey) -> schemas.ApiKey:

def document(self, document: orm.Document) -> schemas.Document:
return schemas.Document(
id=document.id, name=document.name, metadata=document.metadata_
id=document.id,
name=document.name,
metadata=document.metadata_,
mime_type=document.mime_type,
)

def source(self, source: orm.Source) -> schemas.Source:
Expand Down
2 changes: 2 additions & 0 deletions ragna/deploy/_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ def document(self, document: schemas.Document) -> core.Document:
id=document.id,
name=document.name,
metadata=document.metadata,
mime_type=document.mime_type,
)

def source(self, source: schemas.Source) -> core.Source:
Expand Down Expand Up @@ -336,6 +337,7 @@ def document(self, document: core.Document) -> schemas.Document:
id=document.id,
name=document.name,
metadata=document.metadata,
mime_type=document.mime_type,
)

def source(self, source: core.Source) -> schemas.Source:
Expand Down

0 comments on commit e53b180

Please sign in to comment.