We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b91f08e commit 3a6e032Copy full SHA for 3a6e032
backend/PyMatcha/utils/tasks.py
@@ -108,6 +108,11 @@ def update_user_recommendations():
108
count += 1
109
user_to_update_recommendations = []
110
111
+ if not user_to_update.birthdate:
112
+ continue
113
+ if not user_to_update.geohash:
114
115
+
116
user_to_update_age = (
117
today.year
118
- user_to_update.birthdate.year
@@ -123,7 +128,8 @@ def update_user_recommendations():
123
128
score = 0
124
129
125
130
distance = _get_distance(user_to_update.geohash, user.geohash)
126
- score -= distance
131
+ if distance:
132
+ score -= distance
127
133
134
user_age = (
135
0 commit comments