mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 07:21:13 -05:00
Filtering the rest endpoint for resending invites by status = pending
now. Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -14,7 +14,13 @@ from app.dao.invited_user_dao import (
|
||||
)
|
||||
from app.dao.templates_dao import dao_get_template_by_id
|
||||
from app.errors import InvalidRequest, register_errors
|
||||
from app.models import EMAIL_TYPE, INVITE_PENDING, KEY_TYPE_NORMAL, Service
|
||||
from app.models import (
|
||||
EMAIL_TYPE,
|
||||
INVITE_EXPIRED,
|
||||
INVITE_PENDING,
|
||||
KEY_TYPE_NORMAL,
|
||||
Service,
|
||||
)
|
||||
from app.notifications.process_notifications import (
|
||||
persist_notification,
|
||||
send_notification_to_queue,
|
||||
@@ -109,7 +115,9 @@ def resend_service_invite(service_id, invited_user_id):
|
||||
This ignores the POST data entirely.
|
||||
"""
|
||||
fetched = get_invited_user_by_service_and_id(
|
||||
service_id=service_id, invited_user_id=invited_user_id
|
||||
service_id=service_id,
|
||||
invited_user_id=invited_user_id,
|
||||
status=INVITE_EXPIRED,
|
||||
)
|
||||
|
||||
fetched.created_at = datetime.utcnow()
|
||||
|
||||
Reference in New Issue
Block a user