Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vikmapp-ng
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ViKM-Group
vikmapp-ng
Commits
5af84c0e
Commit
5af84c0e
authored
Mar 21, 2016
by
Vassilios Ioannidis
Browse files
Options
Downloads
Patches
Plain Diff
fixed sqlite3 news_id -1 issue
parent
854db6b2
Branches
vava
No related tags found
1 merge request
!1
fixed sqlite3 news_id -1 issue
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/scripts/controllers/news/edit.js
+8
-4
8 additions, 4 deletions
app/scripts/controllers/news/edit.js
with
8 additions
and
4 deletions
app/scripts/controllers/news/edit.js
+
8
−
4
View file @
5af84c0e
...
...
@@ -49,10 +49,14 @@
function
submitNews
(){
vm
.
info
.
project_id
=
(
vm
.
info
.
restricted
==
'
Y
'
)
?
Authentication
.
currentUser
.
project_id
:
null
;
delete
vm
.
info
[
'
restricted
'
];
if
(
vm
.
info
.
news_id
==
-
1
)
News
.
news
.
post
(
vm
.
info
).
then
(
function
(){
if
(
vm
.
info
.
news_id
==
-
1
)
{
//delete the news_id value of -1 as it breaks sqlite3 db
delete
vm
.
info
[
'
news_id
'
];
News
.
news
.
post
(
vm
.
info
).
then
(
function
(){
toastr
.
success
(
'
News created successfuly
'
,
'
success
'
);
$location
.
path
(
"
/news
"
);
});
}
else
vm
.
info
.
save
().
then
(
function
(){
toastr
.
success
(
'
News updated successfuly
'
,
'
success
'
);
$location
.
path
(
"
/news
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment