Skip to content

Commit

Permalink
fix: init metadata view (#6609)
Browse files Browse the repository at this point in the history
* fix: init metadata view

* feat: optimize code

---------

Co-authored-by: 杨国璇 <[email protected]>
  • Loading branch information
YangGuoXuan-0503 and 杨国璇 authored Aug 21, 2024
1 parent 84fc497 commit 50a9068
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions seahub/repo_metadata/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Meta:

class RepoView(object):

def __init__(self, name, type= 'table', view_ids=None):
def __init__(self, name, type='table', view_ids=None):
self.name = name
self.type = type
self.view_json = {}
Expand All @@ -84,7 +84,7 @@ def init_view(self, view_ids=None):

class RepoMetadataViewsManager(models.Manager):

def add_view(self, repo_id, view_name, view_type):
def add_view(self, repo_id, view_name, view_type='table'):
metadata_views = self.filter(repo_id=repo_id).first()
if not metadata_views:
new_view = RepoView(view_name)
Expand Down

0 comments on commit 50a9068

Please sign in to comment.