leadguru-jobs 0.571.0__py3-none-any.whl → 0.572.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {leadguru_jobs-0.571.0.dist-info → leadguru_jobs-0.572.0.dist-info}/METADATA +1 -1
- {leadguru_jobs-0.571.0.dist-info → leadguru_jobs-0.572.0.dist-info}/RECORD +5 -5
- lgt_jobs/lgt_data/mongo_repository.py +13 -1
- {leadguru_jobs-0.571.0.dist-info → leadguru_jobs-0.572.0.dist-info}/WHEEL +0 -0
- {leadguru_jobs-0.571.0.dist-info → leadguru_jobs-0.572.0.dist-info}/top_level.txt +0 -0
@@ -44,11 +44,11 @@ lgt_jobs/lgt_data/engine.py,sha256=Rsbz-CApAo_TVDssdjBkv8v_fVOZm_Uh1S6W4fnaEWo,7
|
|
44
44
|
lgt_jobs/lgt_data/enums.py,sha256=jBH5WGBtDAvFrh4iiPIzlQ-XrImMpuwqstuasG55mJ0,2209
|
45
45
|
lgt_jobs/lgt_data/helpers.py,sha256=NDa-V5EYaJfkGoWsmQSwSe6N_jxNxs8tHRQzW1iST6k,480
|
46
46
|
lgt_jobs/lgt_data/model.py,sha256=BtVpJC_TRXUOklpzwRiDywyuKCCV2GGXtjsRYcPibDc,28454
|
47
|
-
lgt_jobs/lgt_data/mongo_repository.py,sha256=
|
47
|
+
lgt_jobs/lgt_data/mongo_repository.py,sha256=gRR4ZE0zluPIbl9G4N90lQ6OVhRreEaFCGO4BfGVyEY,45918
|
48
48
|
lgt_jobs/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
49
49
|
lgt_jobs/services/web_client.py,sha256=GLWsJkIC8rv6xLFaLwcMm4EwBlVDu0njORwkZqBJaE4,2086
|
50
50
|
lgt_jobs/templates/new_message.html,sha256=BD_E90akmQ1Wf07wtZAjeK_7DUKRmja5HFHVo_AKI24,6994
|
51
|
-
leadguru_jobs-0.
|
52
|
-
leadguru_jobs-0.
|
53
|
-
leadguru_jobs-0.
|
54
|
-
leadguru_jobs-0.
|
51
|
+
leadguru_jobs-0.572.0.dist-info/METADATA,sha256=EewGqxujjN5YCXOYbWlwxKnUMYKwciGXOKW3mY8PEp0,1319
|
52
|
+
leadguru_jobs-0.572.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
53
|
+
leadguru_jobs-0.572.0.dist-info/top_level.txt,sha256=rIuw1DqwbnZyeoarBSC-bYeGOhv9mZBs7_afl9q4_JI,9
|
54
|
+
leadguru_jobs-0.572.0.dist-info/RECORD,,
|
@@ -65,9 +65,21 @@ class UserMongoRepository(BaseMongoRepository):
|
|
65
65
|
update_dict = {k: v for k, v in kwargs.items() if v is not None}
|
66
66
|
self.collection().update_one({'_id': to_object_id(_id)}, {'$set': update_dict})
|
67
67
|
|
68
|
-
def get_users(self, users_ids=None, include_inactive=False):
|
68
|
+
def get_users(self, users_ids=None, include_inactive=False, **kwargs):
|
69
69
|
pipeline = {}
|
70
70
|
|
71
|
+
subscription_expired = kwargs.get('subscription_expired')
|
72
|
+
soon_subscription_expiration = kwargs.get('soon_subscription_expiration')
|
73
|
+
min_days = kwargs.get('min_days_soon_subscription_expiration', 3)
|
74
|
+
|
75
|
+
if subscription_expired:
|
76
|
+
pipeline['subscription_expired_at'] = {'$lte': datetime.now(UTC)}
|
77
|
+
pipeline['subscription_expiration_notified'] = False
|
78
|
+
|
79
|
+
if soon_subscription_expiration:
|
80
|
+
pipeline['subscription_expired_at'] = {'$lte': datetime.now(UTC) + timedelta(min_days)}
|
81
|
+
pipeline['subscription_expiration_warning_notified'] = False
|
82
|
+
|
71
83
|
if users_ids is not None:
|
72
84
|
pipeline['_id'] = {'$in': [to_object_id(_id) for _id in users_ids]}
|
73
85
|
|
File without changes
|
File without changes
|