Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit c0bed722
authored
Jun 10, 2014
by
Matthew Ohlman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug when setting a date field with undefined value
1 parent
04b95b74
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
lib/instance.js
lib/instance.js
View file @
c0bed72
...
@@ -298,7 +298,7 @@ module.exports = (function() {
...
@@ -298,7 +298,7 @@ module.exports = (function() {
}
}
// Convert date fields to real date objects
// Convert date fields to real date objects
if
(
this
.
Model
.
_hasDateAttributes
&&
this
.
Model
.
_isDateAttribute
(
key
)
&&
value
!==
null
&&
!
(
value
instanceof
Date
)
&&
!
value
.
_isSequelizeMethod
)
{
if
(
this
.
Model
.
_hasDateAttributes
&&
this
.
Model
.
_isDateAttribute
(
key
)
&&
value
!==
null
&&
value
!==
undefined
&&
!
(
value
instanceof
Date
)
&&
!
value
.
_isSequelizeMethod
)
{
value
=
new
Date
(
value
);
value
=
new
Date
(
value
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment