From: Bjoern Schiessle Date: Mon, 21 Nov 2016 19:28:21 +0000 (+0100) Subject: use date as device name if no name was given X-Git-Tag: v11.0RC2~186^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2a712abdfd89d43bb3c23d86403059baff75884c;p=nextcloud-server.git use date as device name if no name was given Signed-off-by: Bjoern Schiessle --- diff --git a/settings/js/authtoken_view.js b/settings/js/authtoken_view.js index 24593a04f53..b07d480d66f 100644 --- a/settings/js/authtoken_view.js +++ b/settings/js/authtoken_view.js @@ -307,7 +307,7 @@ var _this = this; this._toggleAddingToken(true); - var deviceName = this._tokenName.val(); + var deviceName = this._tokenName.val() !== '' ? this._tokenName.val() : new Date(); var creatingToken = $.ajax(OC.generateUrl('/settings/personal/authtokens'), { method: 'POST', data: {