Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.19-alpha.2 to 0.1.19-alpha.4

3

errors.js

@@ -13,3 +13,4 @@ function formatObject (obj) {

code: this.code,
message: this.message
message: this.message,
originalException: this.originalException
}

@@ -16,0 +17,0 @@ }

const storageHub = require('../storage/StorageHub')
const { v4 } = require('uuid')
const { AttrModel, Field } = require('../models/AttrModel')
const { basename } = require('path')
const { AttrModel, Field } = require('../models/AttrModel')
const { BooleanField } = require('./BooleanField')
const { createReadStream } = require('fs')

@@ -10,2 +10,3 @@ const { CharField } = require('./CharField')

const { pipeline } = require('stream')
const { v4 } = require('uuid')

@@ -17,2 +18,3 @@ class File extends AttrModel {

static src = new Field()
static stored = new BooleanField({ default: false })

@@ -85,2 +87,8 @@ static meta = {

fromDb (value, inst) {
value = super.fromDb(value, inst)
value.set('stored', true)
return value
}
toDb (value) {

@@ -101,3 +109,3 @@ if (value) {

async saveFileValue (inst, fieldName, value) {
if (value) {
if (value && !value.stored) {
await value.save()

@@ -104,0 +112,0 @@ }

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

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

},
"gitHead": "380e5b3b2201e9f36f148499d93c4ea1723ec1b7"
"gitHead": "f6cf9f13897857d12f0b8801afa7da17e2fc1df6"
}
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