diff options
author | jessib <jessib@riseup.net> | 2014-01-07 09:50:16 -0800 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2014-01-07 09:50:16 -0800 |
commit | 566eee7fa3433af443ffe99449377ab935b8fcc7 (patch) | |
tree | 2d4930110bd656cad2b42e0198e372f20aab6697 | |
parent | b9de6cfeac4ef061f3110afa0be959e41cb6f885 (diff) | |
parent | 74353fef4524e8418acf5dd854ff41d3a06beff0 (diff) |
Merge pull request #133 from azul/bugfix/fix-view-functions
Bugfix/Fix view functions
-rw-r--r-- | users/app/designs/user/by_alias.js | 8 | ||||
-rw-r--r-- | users/app/designs/user/by_login_or_alias.js | 9 | ||||
-rw-r--r-- | users/app/models/identity.rb | 4 |
3 files changed, 3 insertions, 18 deletions
diff --git a/users/app/designs/user/by_alias.js b/users/app/designs/user/by_alias.js deleted file mode 100644 index dc8021a..0000000 --- a/users/app/designs/user/by_alias.js +++ /dev/null @@ -1,8 +0,0 @@ -function(doc) { - if (doc.type != 'User') { - return; - } - doc.email_aliases.forEach(function(alias){ - emit(alias.username, 1); - }); -} diff --git a/users/app/designs/user/by_login_or_alias.js b/users/app/designs/user/by_login_or_alias.js deleted file mode 100644 index 2d2096c..0000000 --- a/users/app/designs/user/by_login_or_alias.js +++ /dev/null @@ -1,9 +0,0 @@ -function(doc) { - if (doc.type != 'User') { - return; - } - emit(doc.login, 1); - doc.email_aliases.forEach(function(alias){ - emit(alias.username, 1); - }); -} diff --git a/users/app/models/identity.rb b/users/app/models/identity.rb index cbb540e..9b97b51 100644 --- a/users/app/models/identity.rb +++ b/users/app/models/identity.rb @@ -24,7 +24,9 @@ class Identity < CouchRest::Model::Base if (doc.type != 'Identity') { return; } - emit(doc.address, doc.keys["pgp"]); + if (typeof doc.keys === "object") { + emit(doc.address, doc.keys["pgp"]); + } } EOJS view :disabled, |