Socket
Socket
Sign inDemoInstall

djorm

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

djorm - npm Package Compare versions

Comparing version 0.1.16-alpha.3 to 0.1.16-alpha.4

18

models/DatabaseModel.js

@@ -102,3 +102,3 @@ const { DatabaseModelBase } = require('./DatabaseModelBase')

*/
getFieldTarget (fieldPath) {
getFieldTarget (fieldPath, value) {
const separatorIndex = fieldPath.indexOf(FIELD_SEPARATOR)

@@ -108,2 +108,5 @@ if (separatorIndex === -1) {

}
if (value === null) {
return null
}
const localFieldName = fieldPath.substr(0, separatorIndex)

@@ -127,7 +130,10 @@ const field = this.constructor.getField(localFieldName)

try {
const [inst, field, fieldName] = this.getFieldTarget(fieldPath)
inst[fieldName] = field.fromDb(
this.constructor.db.parseValue(field, value),
inst
)
const target = this.getFieldTarget(fieldPath, value)
if (target) {
const [inst, field, fieldName] = target
inst[fieldName] = field.fromDb(
this.constructor.db.parseValue(field, value),
inst
)
}
} catch (e) {

@@ -134,0 +140,0 @@ if (e instanceof FieldError) {

{
"name": "djorm",
"version": "0.1.16-alpha.3",
"version": "0.1.16-alpha.4",
"description": "Django like ORM framework",

@@ -39,3 +39,3 @@ "author": "Pavel Žák <pavel@zak.global>",

},
"gitHead": "74a35dd37a5973bad537ae0bd3c6064e31151aab"
"gitHead": "587877d4f462247cb6d0cc13c69bf26795884855"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc