Skip to content

Commit

Permalink
fixes minor bug in question admin panel transltion test (#1674)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsabor authored Dec 11, 2024
1 parent 3a653e0 commit 4b5b031
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion questions/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def post_link(self, obj):
return format_html('<a href="{}">{}</a>', url, f"Post-{post.id}")

def should_update_translations(self, obj):
is_private = obj.post.default_project.default_permission is None
is_private = (
obj.related_posts.first().post.default_project.default_permission is None
)
return not is_private

def get_fields(self, request, obj=None):
Expand Down

0 comments on commit 4b5b031

Please sign in to comment.