Commit a69c027 1 parent a09917b commit a69c027 Copy full SHA for a69c027
File tree 1 file changed +10
-1
lines changed
decidim-proposals/lib/decidim/proposals
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,8 @@ def create_component!
64
64
vote_limit : 0 ,
65
65
attachments_allowed : [ true , false ] . sample ,
66
66
amendments_enabled : participatory_space . id . odd? ,
67
- collaborative_drafts_enabled : true
67
+ collaborative_drafts_enabled : true ,
68
+ geocoding_enabled : [ true , false ] . sample
68
69
} ,
69
70
step_settings :
70
71
}
@@ -96,6 +97,14 @@ def create_proposal!(component:)
96
97
published_at : Time . current
97
98
}
98
99
100
+ if component . settings . geocoding_enabled?
101
+ params = params . merge ( {
102
+ address : "#{ ::Faker ::Address . street_address } #{ ::Faker ::Address . zip } #{ ::Faker ::Address . city } " ,
103
+ latitude : ::Faker ::Address . latitude ,
104
+ longitude : ::Faker ::Address . longitude
105
+ } )
106
+ end
107
+
99
108
proposal = Decidim . traceability . perform_action! (
100
109
"publish" ,
101
110
Decidim ::Proposals ::Proposal ,
You can’t perform that action at this time.
0 commit comments