From: Michael Tremer Date: Wed, 2 Jul 2025 15:01:43 +0000 (+0000) Subject: users: Automatically create the home repository X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b119a61c230867bb0eba6efdece52070b0580cb5;p=pbs.git users: Automatically create the home repository Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/users.py b/src/buildservice/users.py index 352f0428..e78fe006 100644 --- a/src/buildservice/users.py +++ b/src/buildservice/users.py @@ -910,7 +910,12 @@ class User(sqlmodel.SQLModel, database.BackendMixin, database.SoftDeleteMixin, t """ # Return the "home" repository if slug is empty if slug is None: - slug = self.name + repo = await self.get_repo(distro, self.name) + if repo: + return repo + + # If the home repository does not exist, we automatically create it + return await self.backend.repos.create(distro, name=self.name, owner=self) stmt = ( sqlalchemy