1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Working on TravisCI

This commit is contained in:
Hillel Coren 2016-02-17 22:49:34 +02:00
parent 4800c18eb1
commit b63f26f10b
2 changed files with 2 additions and 1 deletions

View File

@ -42,6 +42,7 @@ before_script:
- cp tests/_bootstrap.php.default tests/_bootstrap.php - cp tests/_bootstrap.php.default tests/_bootstrap.php
- php artisan key:generate --no-interaction - php artisan key:generate --no-interaction
- sed -i 's/APP_ENV=production/APP_ENV=development/g' .env - sed -i 's/APP_ENV=production/APP_ENV=development/g' .env
- sed -i 's/APP_DEBUG=false/APP_DEBUG=true/g' .env
# create the database and user # create the database and user
- mysql -u root -e "create database IF NOT EXISTS ninja;" - mysql -u root -e "create database IF NOT EXISTS ninja;"
- mysql -u root -e "GRANT ALL PRIVILEGES ON ninja.* To 'ninja'@'localhost' IDENTIFIED BY 'ninja'; FLUSH PRIVILEGES;" - mysql -u root -e "GRANT ALL PRIVILEGES ON ninja.* To 'ninja'@'localhost' IDENTIFIED BY 'ninja'; FLUSH PRIVILEGES;"

View File

@ -280,7 +280,7 @@ class InvoiceApiController extends BaseAPIController
private function prepareItem($item) private function prepareItem($item)
{ {
// if only the product key is set we'll load the cost and notes // if only the product key is set we'll load the cost and notes
if ($item['product_key'] && empty($item['cost']) && empty($item['notes'])) { if (!empty($item['product_key']) && empty($item['cost']) && empty($item['notes'])) {
$product = Product::findProductByKey($item['product_key']); $product = Product::findProductByKey($item['product_key']);
if ($product) { if ($product) {
if (empty($item['cost'])) { if (empty($item['cost'])) {