Skip to content

Commit

Permalink
Replace orm call with api call
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelovilla committed Nov 12, 2024
1 parent 05d80a2 commit a4e331a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import requests
from conda_store_server import api
from conda_store_server._internal import orm, schema
from conda_store_server._internal import schema
from conda_store_server.server.auth import GenericOAuthAuthentication
from conda_store_server.server.dependencies import get_conda_store
from conda_store_server.storage import S3Storage
Expand Down Expand Up @@ -423,8 +423,7 @@ async def authenticate(self, request):
for namespace in namespaces:
_namespace = api.get_namespace(db, name=namespace)
if _namespace is None:
db.add(orm.Namespace(name=namespace))
db.commit()
api.create_namespace(db, name=namespace)

return schema.AuthenticationToken(
primary_namespace=username,
Expand Down

0 comments on commit a4e331a

Please sign in to comment.