Boil the potatoes in their skins in salted water until tender (about 20-25 minutes), then let cool, peel, and slice into rounds.
Meanwhile, steam the tomatoes (if fresh, peeled and diced) in the oil with the onion for a few minutes, then purée with a stick blender; if using canned, just heat through.
Stir the flour with a little cold water until smooth, add it to the tomato sauce, and mix in thoroughly so it's lump-free.
Bring to a boil, season with sugar and salt, and cook for 5 minutes so the raw flour taste cooks off.
Add the sliced potatoes and cook until the sauce is nicely thick and the potatoes are heated through (about 5 minutes).
Off the heat, stir in the sour cream.
Based on: Malatinszky Fanny szakácskönyve (a classic Hungarian cookbook), modernised. Calories and protein are estimated.