Skip to content

Commit

Permalink
spam: breaking bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Glignos committed Jan 13, 2021
1 parent 9a48f3f commit 76c3581
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Expand Up @@ -22,12 +22,12 @@
# as an Intergovernmental Organization or submit itself to any jurisdiction.
-#}
{% if community %}
{% set content_text = 'the creation of the community with ID: ' + {{ community.id }} %}
{% set content_text = 'the creation of the community with ID: ' + community.id %}
{% else %}
{% set content_text = 'the publication of your deposit titled: ' + {{ deposit.title }} %}
{% set content_text = 'the publication of your deposit titled: ' + deposit.title %}
{% endif %}

Our spam protection system has classified {{content_text}} as potential spam content.
Our spam protection system has classified {{ content_text }} as potential spam content.
As a preventive measure, we have deactivated your user account.

We sincerely apologize if this was a mistake, in which case, please contact us on our support line at https://zenodo.org/support.
3 changes: 2 additions & 1 deletion zenodo/modules/spam/utils.py
Expand Up @@ -89,7 +89,8 @@ def check_and_handle_spam(community=None, deposit=None):
Q('query_string', query="owners:{}".format(
community.id_user))).count()
has_communities = Community.query.filter_by(
id_user=community.id_user).count()
id_user=community.id_user).count() - 1

if not (has_records or has_communities):
current_app.config['ZENODO_SPAM_HANDLING_ACTIONS'](
community=community, deposit=deposit)
Expand Down

0 comments on commit 76c3581

Please sign in to comment.