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
Merge requests
!1
fixed sqlite3 news_id -1 issue
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Open
fixed sqlite3 news_id -1 issue
vava
into
master
Overview
0
Commits
1
Changes
Open
fixed sqlite3 news_id -1 issue
Vassilios Ioannidis
requested to merge
vava
into
master
Mar 21, 2016
Overview
0
Commits
1
Changes
-
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
5af84c0e
1 commit,
Mar 21, 2016
+
8
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Conflict: This file was modified in both the source and target branches. Ask someone with write access to resolve it.
app/scripts/controllers/news/edit.js
+
8
−
4
View file @ 5af84c0e
Edit in single-file editor
Open in Web IDE
Show full file
@@ -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(){
toastr.success('News created successfuly','success');
$location.path("/news");
});
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");
Loading