You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/09/09 01:42:39 UTC
[GitHub] [openwhisk] style95 commented on a change in pull request #4611:
Factor out subjects view name for identities
style95 commented on a change in pull request #4611: Factor out subjects view name for identities
URL: https://github.com/apache/openwhisk/pull/4611#discussion_r322042519
##########
File path: common/scala/src/main/scala/org/apache/openwhisk/core/entity/Identity.scala
##########
@@ -129,10 +131,12 @@ object Identity extends MultipleReadersSingleWriterCache[Option[Identity], DocIn
stale = StaleParameter.No)
}
- private def rowToIdentity(row: JsObject, key: String)(implicit transid: TransactionId, logger: Logging) = {
+ protected[entity] def rowToIdentity(row: JsObject, key: String)(implicit transid: TransactionId, logger: Logging) = {
row.getFields("id", "value", "doc") match {
case Seq(JsString(id), JsObject(value), doc) =>
- val limits = Try(doc.convertTo[UserLimits]).getOrElse(UserLimits())
+ val limits =
+ if (doc != JsNull) Try(doc.convertTo[UserLimits]).getOrElse(UserLimits.standardUserLimits)
Review comment:
Does this imply the deafult value for `UserLimits` may change in the future so that you use a variable instead of direct `UserLimits()`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services