forked from mirrors/bookwyrm
full path in user-based remote id
This commit is contained in:
parent
582ebc0fe3
commit
d633826a20
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ class BookWyrmModel(models.Model):
|
||||||
''' generate a url that resolves to the local object '''
|
''' generate a url that resolves to the local object '''
|
||||||
base_path = 'https://%s' % DOMAIN
|
base_path = 'https://%s' % DOMAIN
|
||||||
if hasattr(self, 'user'):
|
if hasattr(self, 'user'):
|
||||||
base_path = self.user.local_path
|
base_path = '%s/%s' % (base_path, self.user.local_path)
|
||||||
model_name = type(self).__name__.lower()
|
model_name = type(self).__name__.lower()
|
||||||
return '%s/%s/%d' % (base_path, model_name, self.id)
|
return '%s/%s/%d' % (base_path, model_name, self.id)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue