Skip to content

Commit

Permalink
Adding project field when inserting on destination table
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiobogossian committed Jul 2, 2020
1 parent d95cc8f commit 0c7e798
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion docker/docker-build.sh → docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PROJECT="forestmonitor"

REPOSITORY="forest-monitor-backend"

VERSION=$(grep version ../setup.py | head -1 | sed 's/.*"\(.*\)".*/\1/')
VERSION=$(grep version setup.py | head -1 | sed 's/.*"\(.*\)".*/\1/')

docker build -t $PROJECT/$REPOSITORY:v$VERSION -f Dockerfile .

Expand Down
4 changes: 2 additions & 2 deletions forest_monitor/monitor/business.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ def add(cls, values, user_id=None):
)
INSERT INTO ''' + destinationTable + ''' (classname, quadrant, path_row, view_date, sensor,
satellite, areauckm, uc, areamunkm, municipali,
uf, geom, scene_id, source, user_id, created_at, image_date)
uf, geom, scene_id, source, user_id, created_at, image_date, project)
SELECT :classname AS classname, :quadrant AS quadrant,
:path_row AS path_row, :view_date AS view_date, :sensor AS sensor,
:satellite AS satellite, :areauckm AS areauckm,
:uc AS uc, :areamunkm AS areamunkm, :municipali AS municipali,
:uf AS uf, ST_Multi(geom), :scene_id AS scene_id, :source AS source,
:user_id AS user_id, :created_at as created_at, :image_date AS image_date
:user_id AS user_id, :created_at as created_at, :image_date AS image_date, :project AS project
FROM result
''')

Expand Down

0 comments on commit 0c7e798

Please sign in to comment.