[recipes] Make importing work again



commit 8a03b223ef58fbe7da17d2202fdb33cd7f495b94
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Dec 19 09:48:04 2016 -0500

    Make importing work again
    
    When I moved to a purely-internal ID for recipes, I forgot to
    make the importer create one. Imports are failing due to that.

 src/gr-recipe-importer.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gr-recipe-importer.c b/src/gr-recipe-importer.c
index cd4b359..46a79f5 100644
--- a/src/gr-recipe-importer.c
+++ b/src/gr-recipe-importer.c
@@ -238,6 +238,7 @@ do_import_recipe (GrRecipeImporter *importer)
         g_autoptr(GArray) images = NULL;
         g_autoptr(GrRecipe) recipe = NULL;
         g_autoptr(GError) error = NULL;
+        g_autofree char *id = NULL;
 
         store = gr_app_get_recipe_store (GR_APP (g_application_get_default ()));
 
@@ -261,7 +262,9 @@ do_import_recipe (GrRecipeImporter *importer)
         }
 
         recipe = gr_recipe_new ();
+        id = g_strconcat (importer->recipe_name, "_by_", importer->chef_id, NULL);
         g_object_set (recipe,
+                      "id", id,
                       "name", importer->recipe_name,
                       "author", importer->chef_id,
                       "description", importer->recipe_description,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]