Commit cc34f8a5 authored by John Red Medrano's avatar John Red Medrano

fixed bug on sending mail at reset-password admin level

parent 21b10756
......@@ -182,9 +182,11 @@ class UserViewSet(viewsets.ModelViewSet):
@decorators.error_safe
@rms.user_create
@transaction.atomic
def ResetPassword(self, request, pk=None):
def ResetPassword(self, request, code=None):
existingUser = User.objects.filter(id=pk).first()
existingUser = User.objects.filter(code=str(code))
pk = existingUser.values().first()['id']
existingUser = existingUser.first()
if existingUser:
......
......@@ -138,7 +138,7 @@ def admin_changepassword(args):
subject='OB RMS: Password Changed!',
message='',
from_email=settings.EMAIL_DEFAULT_SENDER,
recipient_list=[recipient,],
recipient_list=[recipient, admin,],
html_message=FC
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment