Peel and finely dice the onion and garlic. Cut the sausage into slices. Fry in hot oil while turning for about 5 minutes. Fry onion and garlic briefly. Add tomatoes, bring to the boil. Season with salt, pepper and 1 pinch of sugar.
Cover and simmer for about 10 minutes.
Rinse the beans briefly in a sieve and let them drip off. Wash the thyme, shake dry and remove the leaves. Stir the beans and thyme into the sauce. Simmer for about 5 minutes. Season to taste again.
Ciabatta is delicious with it.