ソースを参照

feat(sqlalchemy): formatting

Jonathan Rohde 10 ヶ月 前
コミット
23e4d9daff

+ 2 - 1
backend/apps/webui/models/auths.py

@@ -113,7 +113,8 @@ class AuthsTable:
         Session.add(result)
 
         user = Users.insert_new_user(
-            id, name, email, profile_image_url, role, oauth_sub)
+            id, name, email, profile_image_url, role, oauth_sub
+        )
 
         Session.commit()
         Session.refresh(result)

+ 1 - 1
backend/migrations/versions/7e5b5dc7342b_init.py

@@ -176,7 +176,7 @@ def upgrade() -> None:
             sa.Column("api_key", sa.String(), nullable=True),
             sa.Column("settings", apps.webui.internal.db.JSONField(), nullable=True),
             sa.Column("info", apps.webui.internal.db.JSONField(), nullable=True),
-            sa.Column('oauth_sub', sa.Text(), nullable=True),
+            sa.Column("oauth_sub", sa.Text(), nullable=True),
             sa.PrimaryKeyConstraint("id"),
             sa.UniqueConstraint("api_key"),
             sa.UniqueConstraint("oauth_sub"),

+ 3 - 1
backend/test/apps/webui/routers/test_models.py

@@ -42,7 +42,9 @@ class TestModels(AbstractPostgresTest):
         assert len(response.json()) == 1
 
         with mock_webui_user(id="2"):
-            response = self.fast_api_client.get(self.create_url(query_params={"id": "my-model"}))
+            response = self.fast_api_client.get(
+                self.create_url(query_params={"id": "my-model"})
+            )
         assert response.status_code == 200
         data = response.json()[0]
         assert data["id"] == "my-model"