Set address to empty in quick report upload
Fixes a null value error
This commit is contained in:
parent
684c424131
commit
b95a3275ff
1 changed files with 1 additions and 1 deletions
|
|
@ -54,7 +54,6 @@ func postQuick(w http.ResponseWriter, r *http.Request) {
|
||||||
lat := r.FormValue("latitude")
|
lat := r.FormValue("latitude")
|
||||||
lng := r.FormValue("longitude")
|
lng := r.FormValue("longitude")
|
||||||
comments := r.FormValue("comments")
|
comments := r.FormValue("comments")
|
||||||
//photos := r.FormValue("photos")
|
|
||||||
|
|
||||||
latitude, err := strconv.ParseFloat(lat, 64)
|
latitude, err := strconv.ParseFloat(lat, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -73,6 +72,7 @@ func postQuick(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
c, err := h3utils.GetCell(longitude, latitude, 15)
|
c, err := h3utils.GetCell(longitude, latitude, 15)
|
||||||
setter := models.PublicreportQuickSetter{
|
setter := models.PublicreportQuickSetter{
|
||||||
|
Address: omit.From(""),
|
||||||
Created: omit.From(time.Now()),
|
Created: omit.From(time.Now()),
|
||||||
Comments: omit.From(comments),
|
Comments: omit.From(comments),
|
||||||
//Location: omitnull.From(fmt.Sprintf("ST_GeometryFromText(Point(%s %s))", longitude, latitude)),
|
//Location: omitnull.From(fmt.Sprintf("ST_GeometryFromText(Point(%s %s))", longitude, latitude)),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue