Removes debug print statements

This commit is contained in:
Mouse Reeve 2021-10-27 10:26:55 -07:00
parent 94ce426617
commit c9dc1437a1
2 changed files with 0 additions and 6 deletions

View file

@ -47,9 +47,7 @@ class ActorModel(BookWyrmModel):
def save(self, *args, **kwargs):
"""set fields"""
print('at the parent')
created = not bool(self.id)
print('parent created', created)
if not created:
super().save(*args, **kwargs)
return

View file

@ -237,9 +237,7 @@ class User(OrderedCollectionPageMixin, AbstractUser, ActorModel):
def save(self, *args, **kwargs):
"""populate fields for new local users"""
print('hi')
created = not bool(self.id)
print('created', created)
if not self.local and not re.match(regex.FULL_USERNAME, self.username):
# parse out the username that uses the domain (webfinger format)
actor_parts = urlparse(self.remote_id)
@ -259,11 +257,9 @@ class User(OrderedCollectionPageMixin, AbstractUser, ActorModel):
with transaction.atomic():
# populate fields for local users
link = site_link()
print('link', link)
self.remote_id = f"{link}/user/{self.localname}"
self.shared_inbox = f"{link}/inbox"
# an id needs to be set before we can proceed with related models
print('heading to the parent')
super().save(*args, **kwargs)
# make users editors by default