1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-12 10:45:38 +02:00

fix: PATCH /user will overwrite existing "forward_destination"

This commit is contained in:
DrPsychick 2024-08-15 12:49:41 +02:00
parent 16cfe01d56
commit 73914d1df8

View File

@ -242,8 +242,7 @@ class User(Resource):
if 'forward_enabled' in data:
user_found.forward_enabled = data['forward_enabled']
if 'forward_destination' in data and len(data['forward_destination']) > 0:
if len(data['forward_destination']) == 0:
user_found.forward_destination = data['forward_destination']
user_found.forward_destination = data['forward_destination']
if 'forward_keep' in data:
user_found.forward_keep = data['forward_keep']
if 'reply_enabled' in data: