Skip to content

Commit

Permalink
Fix for indentation error
Browse files Browse the repository at this point in the history
  • Loading branch information
josiahcarlson committed Aug 27, 2018
1 parent 6c7bade commit 9156ad6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/ch03_listing_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def update_token(conn, token, user, item=None):
conn.lrem(key, item) #A
conn.rpush(key, item) #B
conn.ltrim(key, -25, -1) #C
conn.zincrby('viewed:', item, -1)
conn.zincrby('viewed:', item, -1)
# <end id="exercise-update-token"/>
#A Remove the item from the list if it was there
#B Push the item to the right side of the LIST so that ZRANGE and LRANGE have the same result
Expand Down Expand Up @@ -570,8 +570,8 @@ def update_token(conn, token, user, item=None):
conn.lrem(key, item)
conn.rpush(key, item)
conn.ltrim(key, -25, -1)
conn.zincrby('viewed:', item, -1)
conn.expire(key, THIRTY_DAYS) #C
conn.zincrby('viewed:', item, -1)

def add_to_cart(conn, session, item, count):
key = 'cart:' + session
Expand Down

0 comments on commit 9156ad6

Please sign in to comment.