Archived
Properly check if the activation code is still valid in has_pending_new_membership
This commit is contained in:
1 parent
386390f59b
commit
48b8477b8e
1 file changed
+1
-1
+1
-1
@@ -373,7 +373,7 @@ def has_pending_new_membership(number):
|
||||
WHERE incoming.msisdn = %s
|
||||
AND incoming.id = event.incoming_id
|
||||
AND event.action = 'new_membership'
|
||||
AND event.timestamp > DATE_SUB(event.timestamp, INTERVAL 1 YEAR)
|
||||
AND event.timestamp > DATE_SUB(CURDATE(), INTERVAL 1 YEAR)
|
||||
AND event2.incoming_id = event.incoming_id
|
||||
AND event2.action = 'new_membership_delivered')
|
||||
AND activation_code IS NOT NULL""", [number], one=True)
|
||||
|
||||
Reference in new issue
Block a user