Allow reports with no associated user
This commit is contained in:
parent
0be4fec167
commit
4f386e8c4e
8 changed files with 43 additions and 10 deletions
|
@ -13,9 +13,13 @@ from bookwyrm import emailing, forms, models
|
|||
class Report(View):
|
||||
"""Make reports"""
|
||||
|
||||
def get(self, request, user_id, status_id=None, link_id=None):
|
||||
def get(self, request, user_id=None, status_id=None, link_id=None):
|
||||
"""static view of report modal"""
|
||||
data = {"user": get_object_or_404(models.User, id=user_id)}
|
||||
data = {"user": None}
|
||||
if user_id:
|
||||
# but normally we should have an error if the user is not found
|
||||
data["user"] = get_object_or_404(models.User, id=user_id)
|
||||
|
||||
if status_id:
|
||||
data["status"] = status_id
|
||||
if link_id:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue