kopia lustrzana https://github.com/hholzgra/maposmatic/
Handle the new job fields in the recreate view
Make sure the new MapRenderingJob fields (layout, stylesheet and papersize) are copied when recreating a map. Removing the cache check, too. Signed-off-by: Maxime Petazzoni <maxime.petazzoni@bulix.org>stable
rodzic
1ac3c7d22c
commit
3a1f8a90c8
|
@ -232,12 +232,6 @@ def recreate(request):
|
|||
job = get_object_or_404(models.MapRenderingJob,
|
||||
id=form.cleaned_data['jobid'])
|
||||
|
||||
existing = helpers.rendering_already_exists(job)
|
||||
if existing:
|
||||
request.session['redirected'] = True
|
||||
return HttpResponseRedirect(reverse('job-by-id',
|
||||
args=[existing]))
|
||||
|
||||
newjob = models.MapRenderingJob()
|
||||
newjob.maptitle = job.maptitle
|
||||
|
||||
|
@ -249,6 +243,10 @@ def recreate(request):
|
|||
newjob.lat_bottom_right = job.lat_bottom_right
|
||||
newjob.lon_bottom_right = job.lon_bottom_right
|
||||
|
||||
newjob.stylesheet = job.stylesheet
|
||||
newjob.layout = job.layout
|
||||
newjob.papersize = job.papersize
|
||||
|
||||
newjob.status = 0 # Submitted
|
||||
newjob.submitterip = request.META['REMOTE_ADDR']
|
||||
newjob.map_language = job.map_language
|
||||
|
|
Ładowanie…
Reference in New Issue