Skip to content

Commit

Permalink
Fix in publication which was given "new subscriber" when a user didn'…
Browse files Browse the repository at this point in the history
…t publish at all during the previous month.
  • Loading branch information
DEKHTIARJonathan committed Aug 14, 2017
1 parent 8611597 commit eba73cb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions feedcrunch_rssadmin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,15 @@ def index(request, feedname=None):
publication_trend = int(round(abs(publication_trend),0))

except ZeroDivisionError:
publication_trend = -1
post_trending = "new_releases"
post_trending_color = "blue-grey-text"
timedelta_registred = timezone.now() - request.user.date_joined
if (timedelta_registred.days < 31):
publication_trend = -1
post_trending = "new_releases"
post_trending_color = "blue-grey-text"
else:
publication_trend = 0
post_trending = "trending_flat"
post_trending_color = "blue-grey-text"

data = {
'monthtime_elapsed': monthtime_elapsed,
Expand Down

0 comments on commit eba73cb

Please sign in to comment.