Skip to content

Commit

Permalink
fix: FileMetadata export_links type definition
Browse files Browse the repository at this point in the history
  • Loading branch information
milovate committed Dec 23, 2024
1 parent b91b325 commit 0348a7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion daras_ai_v2/gdrive_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from daras_ai_v2.functional import flatmap_parallel
from daras_ai_v2.exceptions import raise_for_status

docs_export_mimetype = {
DOCS_EXPORT_MIMETYPES = {
"application/vnd.google-apps.document": "text/plain",
"application/vnd.google-apps.spreadsheet": "text/csv",
"application/vnd.google-apps.presentation": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
Expand Down
5 changes: 1 addition & 4 deletions files/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ class FileMetadata(models.Model):
etag = models.CharField(max_length=255, null=True)
mime_type = models.CharField(max_length=255, default="", blank=True)
total_bytes = models.PositiveIntegerField(default=0, blank=True)

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.export_links = {}
export_links: dict[str, str] | None = None

def __str__(self):
ret = f"{self.name or 'Unnamed'} - {self.mime_type}"
Expand Down

0 comments on commit 0348a7a

Please sign in to comment.